Displaying 1 result from an estimated 1 matches for "factor_class".
Did you mean:
factor_classes
2012 Dec 16
2
non-numeric argument to binary operator
Hello,
I wish to carry out the following:
factor_classes <- as.factor(sample(c("BM", "SM", "F"), 10, replace = TRUE))
C <- 5
k <- matrix(0, length(factor_classes), 1)
for (i in length(factor_classes)) {
k[i] <- C*factor_classes[i]
}
I get the following error message:
non-numeric argument to binary...