I am using R version 2.6.0 on Linux (CentOS 4.5) and have a problem with executing nearZeroVar function in the package caret.
I am using the latest release of caret v4.17. I have a matrix X with 266 rows and 4 columns and when implementing nearZeroVar function from caret package I get following error message. > C <- nearZeroVar(X); Error in table(data, useNA = "no") : all arguments must have the same length Calls: nearZeroVar -> apply -> FUN -> table I have executed step by step commands in the function nearZeroVar and found that it fails when it tries > t<- table(X,useNa = "no") Error in table(X, useNa = "no") : all arguments must have the same length If I try without useNa="no" it works fine > t<- table(X) > t X 0 1 9 11 12 14 17 18 21 22 37 39 66 123 1026 10 1 5 8 1 1 1 1 1 2 4 1 2 > When I tried to see the code for table there is no mention of useNa. > table function (..., exclude = c(NA, NaN), dnn = list.names(...), deparse.level = 1) { Could this be a problem with my current version of R 2.6 ? In the specs for caret it depends on R>2.5.1. Thanks in advance DK _________________________________________________________________ [[elided Hotmail spam]] [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.