Could any one help ? I start to learn the glmnet package. I tried with the example in the manual.

x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit1=glmnet(x,y)


When I tried to fit the model, I received the error message:

Error in validObject(.Object) :
invalid class "dgCMatrix" object: row indices are not sorted within columns

Thank you very much!

______________________________________________
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.

Reply via email to