Dear Hao, It works for me. Here is my sessionInfo(): > sessionInfo() R version 2.8.0 Patched (2008-11-08 r46864) i386-pc-mingw32
locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] glmnet_1.1-1 Matrix_0.999375-16 lattice_0.17-15 plotrix_2.5 Which version of R are you using? HTH, Jorge On Wed, Dec 17, 2008 at 3:50 PM, Hao <haotang1...@gmail.com> wrote: > 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. > [[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.