Dear R users, I am new user for elastic net. I am trying to use elasticnet library. I have marker data with 359 markers and 168 samples, and response is metabolites. I am trying to do regression between a metabolite and markers. But i am getting the following error: > en<-enet(marker,as.numeric(vio),lambda=0.5,normalize=FALSE,intercept=TRUE) Error in one %*% x : requires numeric matrix/vector arguments
Then, I convert marker into numeric by using the following command. And, here also getting error. > as.numeric(marker) Error: (list) object cannot be coerced to type 'double' > is.numeric(marker) [1] FALSE Alternatively, I converted marker into numeric by using data.frame command, it seems markers are now converted into numeric. > is.factor(datafram01[,1]) [1] FALSE > is.numeric(datafram01[,1]) [1] TRUE But when i did again elastic net, i got the same error: > en<-enet(datafram01,as.numeric(vio),lambda=0.5,normalize=FALSE,intercept=TRUE) Error in one %*% x : requires numeric matrix/vector arguments Does someone have ideas to overcome these problem? If it is, it will be great help for me. Thanks in advance. Sincerely, Ram Kumar Basnet Wageningen University, The Netherlands [[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.