Open tongjiyiming opened 5 years ago
my script is cat_train <- hashed.model.matrix( f, as.data.table(cat_train), HASHING_DIM_ ) I got
cat_train <- hashed.model.matrix( f, as.data.table(cat_train), HASHING_DIM_ )
Error in as(retval, "dgCMatrix") : no method or default for coercing “CSCMatrix” to “dgCMatrix”
when I run it in a command line terminal with plain R script environment. But, the code works inside Rstudio.
Please check
Please add:
library(methods)
at the beginning of your script and try again.
my script is
cat_train <- hashed.model.matrix( f, as.data.table(cat_train), HASHING_DIM_ )
I gotwhen I run it in a command line terminal with plain R script environment. But, the code works inside Rstudio.
Please check