Re: [R] Why would something work in R but not Rscript?

2014-12-15 Thread Jeff Hansen
See ?Rscript for details. For > any scripts intended for batch usage, the safest is to only assume > that 'base' is attached, but nothing else. > > /Henrik > > On Wed, Nov 19, 2014 at 10:03 AM, Ben Tupper > wrote: > > Hi, > > > > On Nov 19, 2014, at

[R] Why would something work in R but not Rscript?

2014-11-19 Thread Jeff Hansen
I have a script that uses RWeka (and consequently rJava). When I run it in Rstudio everything works fine. When I run it with `R CMD BATCH`, everything also works fine. However, when I run it with Rscript, I get the following error: Error in FUN(X[[1L]], ...) : object is not a Java object refere

[R] linear classifiers with sparse matrices

2011-10-06 Thread Jeff Hansen
I've been trying to get some linear classifiers (LiblineaR, kernlab, e1071) to work with a sparse matrix of feature data. In the case of LiblineaR and kernlab, it seems I have to coerce my data into a dense matrix in order to train a model. I've done a number of searches, read through the manuals