SOLVED - using as.integer as instructed by "The R Book" (2013, p. 44) - doesn't work.
I've searched the forums but haven't had any answers on this small problem. I've tried a to coerce a vector to being an integer as instructed by The R Book:
> x <- c(5,3,7,8)
> x <-...