[R] Error in elastic net

Steve Lianoglou mailinglist.honeypot at gmail.com
Wed Aug 5 04:10:51 CEST 2009


Ram,

Did my email from earlier today not help?

http://article.gmane.org/gmane.comp.lang.r.general/158431

-steve

On Aug 4, 2009, at 6:22 PM, ram basnet wrote:

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

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
   |  Memorial Sloan-Kettering Cancer Center
   |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact




More information about the R-help mailing list