[R] Problem with 'lars' package
Hello, I have problems with 'lars' package. I found the previous post of the person who had the same issue, but the suggested solution in that post did not help me. I created the matrices: ResponseMatrix - data.frame (GAOdecision=GAOdecision) PredictorsMatrix - data.frame (WeaponvsNon = WeaponvsNon, ProductvsService = ProductvsService, KDuration = KDuration, BusinessSize = BusinessSize, Bidders = Bidders, Staging = Staging, Criteria = Criteria, KPricing = KPricing, Political = Political) and then output - lars(PredictorsMatrix, ResponseMatrix) *Error in one %*% x : requires numeric/complex matrix/vector arguments* * * I did not create any variables x in my code. I also used rm(x) in the beginning of my code, but it did not help. I would really appreciate any help. Thanks, Vlad [[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.
Re: [R] Problem with 'lars' package
Hi, On Fri, Nov 5, 2010 at 4:14 PM, Vladimir Subbotin subbotinvladim...@gmail.com wrote: Hello, I have problems with 'lars' package. I found the previous post of the person who had the same issue, but the suggested solution in that post did not help me. I created the matrices: ResponseMatrix - data.frame (GAOdecision=GAOdecision) PredictorsMatrix - data.frame (WeaponvsNon = WeaponvsNon, ProductvsService = ProductvsService, KDuration = KDuration, BusinessSize = BusinessSize, Bidders = Bidders, Staging = Staging, Criteria = Criteria, KPricing = KPricing, Political = Political) and then output - lars(PredictorsMatrix, ResponseMatrix) *Error in one %*% x : requires numeric/complex matrix/vector arguments* This is likely talking about variables in the function -- for instance, not that the first parameter in the function is named 'x'. Also, your ResponeMatrix and PredictorsMatrix should be of type *matrix* not data.frame ... you can try to convert it with as.matrix(ResponseMatrix). You should then ensure that all values in your response and predictors matrix are numeric, ie: all(is.numeric(ResponseMatrix)), etc ... also check for odd values like NA, NaN or Inf. Lastly, consider using the glmnet package instead of lars. It provides a superset of the functionality from lars, and its core is written in fortran, so will likely be much faster and deal with larger problems. It's also more actively maintained (note a new version of glmnet was just released this week). -steve -- 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 __ 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.
Re: [R] Problem with 'lars' package
On 27.04.2010 07:33, Tal Galili wrote: The CRAN website is down, and will remain so for the next few hours, see link for alternative images: http://www.r-bloggers.com/r-project-websites-down/ ... which explains one warning, see bewlow. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Tue, Apr 27, 2010 at 1:58 AM,khasan...@berkeley.edu wrote: Hi, I'm having trouble running 'lars'. When I install it I get the following warning: install.packages('lars') Warning in install.packages(lars) : argument 'lib' is missing: using 'C:\Users\Anna\Documents/R/win-library/2.10' Well, you have not specified a library, hence the first one from .libPaths() is used. You can probably ignore it if this is fine for you. --- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.10/lars_0.9-7.zip' Content type 'application/zip' length 211898 bytes (206 Kb) opened URL downloaded 206 Kb package 'lars' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\Anna\AppData\Local\Temp\RtmpmRYoLn\downloaded_packages Warning message: In open.connection(con, r) : unable to connect to 'cran.r-project.org' on port 80. The CRAN master is unexpectedly unavailable as explained by Tal Galili. This can be ignored, R tried to update the list of mirrors for you (from the CRAN master). When I actually try to run it, it gives me the following message: Error: argument Gram is missing, with no default You misspecified a function call,I guess. But hard to say what you did without seeing the actual code. Uwe Ligges What is the problem? Thank you, Anna __ 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. __ 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.
[R] Problem with 'lars' package
Hi, I'm having trouble running 'lars'. When I install it I get the following warning: install.packages('lars') Warning in install.packages(lars) : argument 'lib' is missing: using 'C:\Users\Anna\Documents/R/win-library/2.10' --- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.10/lars_0.9-7.zip' Content type 'application/zip' length 211898 bytes (206 Kb) opened URL downloaded 206 Kb package 'lars' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\Anna\AppData\Local\Temp\RtmpmRYoLn\downloaded_packages Warning message: In open.connection(con, r) : unable to connect to 'cran.r-project.org' on port 80. When I actually try to run it, it gives me the following message: Error: argument Gram is missing, with no default What is the problem? Thank you, Anna __ 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.
Re: [R] Problem with 'lars' package
The CRAN website is down, and will remain so for the next few hours, see link for alternative images: http://www.r-bloggers.com/r-project-websites-down/ Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Tue, Apr 27, 2010 at 1:58 AM, khasan...@berkeley.edu wrote: Hi, I'm having trouble running 'lars'. When I install it I get the following warning: install.packages('lars') Warning in install.packages(lars) : argument 'lib' is missing: using 'C:\Users\Anna\Documents/R/win-library/2.10' --- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.10/lars_0.9-7.zip' Content type 'application/zip' length 211898 bytes (206 Kb) opened URL downloaded 206 Kb package 'lars' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\Anna\AppData\Local\Temp\RtmpmRYoLn\downloaded_packages Warning message: In open.connection(con, r) : unable to connect to 'cran.r-project.org' on port 80. When I actually try to run it, it gives me the following message: Error: argument Gram is missing, with no default What is the problem? Thank you, Anna __ 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.