Here's my code:
iFacVector <- as.factor(c(1,1,1,1,10,1,1,1,12,9,9,1,10,12,1,9,5))
iTargetVector <- c(2,1,0,1,6,9,15,1,8,0,1,2,1,1,9,12,1)
bp <- plot(iFacVector,iTargetVector)
Error in xy.coords(x, y, recycle = TRUE) :
(list) object cannot be coerced to type 'double'
The help for
text gives the arguments as
so the first argument in your code, bp, is being treated as the x coordinate for where to place the text. You can just leave off the bp and get better behavior. You might also want to add
pos=3 to get a nicer placement of the text.