What does the error "object not interpretable as a factor" mean?

if you write uppercase like C instead of c then this error will occur, and keep in mind R is case sensitive and you can't do that.


Always remember that R is case sensitive. You have typed vect <- C which is uppercase. Change it to vect <- c and you will be sorted.


I tried it different ways. For me it was the c between the c. For example, v2 =c(10,20,30,40,50)

v2 = (C(10,20,30,40,50)) Error in C(10, 20, 30, 40, 50) : object not interpretable as a factor

[correct version]

v2 =c(10,20,30,40,50) v2 [1] 10 20 30 40 50


This error can perhaps come up with multiple problems, but in your case you simply typed a capital C instead of a lowercase c.

Try:

vect <- c(1, NA, 2, 3, 4, NA, 5, NA, 6, 7, 8, NA, 9)

Tags:

R