Re: [R] write.matrix.csr data conversion

2012-11-06 Thread Sam Steingold
Dear David, > * David Meyer [2012-11-06 19:49:15 +0100]: > > there is C-code related to *reading* in such a file, but in the > internal libsvm-format, not the matrix.csr format. How is the libsvm-format differ from matrix.csr format? I actually use matrix.csr only because it prints to what libsv

Re: [R] write.matrix.csr data conversion

2012-11-06 Thread David Meyer
Dear Sam, there is C-code related to *reading* in such a file, but in the internal libsvm-format, not the matrix.csr format. There is no C-code for *writing* this to a file. There is certainly a way to speed this up, but I am not likely to do this in the near future. Best David On 2012-11

Re: [R] write.matrix.csr data conversion

2012-11-06 Thread Sam Steingold
David, thanks for adding the feature. read.matrix.csr and, especially, write.matrix.csr are extremely slow: usersystem elapsed 8381.988 3810.396 12345.349 for a 2797634 x 224 matrix I have to deal with. The help page http://rss.acs.unt.edu/Rdoc/library/e1071/html/read.matrix.csr.ht

Re: [R] write.matrix.csr data conversion

2012-08-29 Thread David Meyer
Yes, it seems that Prof Meyer hasn't pushed the changes to R forge yet. I now did. (There are no other repositories). David __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] write.matrix.csr data conversion

2012-08-28 Thread R. Michael Weylandt
On Tue, Aug 28, 2012 at 11:39 PM, Sam Steingold wrote: >> * R. Michael Weylandt [2012-08-28 17:16:35 >> -0500]: >> >> install.packages by default goes to CRAN (the stable repository): > > how often are stable released made? > weekly? monthly? > At the discretion of the package maintainers and t

Re: [R] write.matrix.csr data conversion

2012-08-28 Thread Sam Steingold
> * R. Michael Weylandt [2012-08-28 17:16:35 > -0500]: > > install.packages by default goes to CRAN (the stable repository): how often are stable released made? weekly? monthly? > if you want the bleeding edge, install e1071 from R-forge (note you > might need a source install if the build bot

Re: [R] write.matrix.csr data conversion

2012-08-28 Thread R. Michael Weylandt
install.packages by default goes to CRAN (the stable repository): if you want the bleeding edge, install e1071 from R-forge (note you might need a source install if the build bot hasn't gotten to it since the update) https://r-forge.r-project.org/R/?group_id=786 Cheers, Michael On Tue, Aug 28, 2

Re: [R] write.matrix.csr data conversion

2012-08-28 Thread Sam Steingold
Thanks, when will I be able to use the new code? I just did install.packages("e1071") + library(e1071). no good. do I need to restart R? thanks! > * David Meyer [2012-08-27 22:57:17 +0200]: > > done, thanks for the suggestion. > > On 2012-08-27 21:15, Sam Steingold wrote: >> >> David, could you p

Re: [R] write.matrix.csr data conversion

2012-08-27 Thread David Meyer
done, thanks for the suggestion. David On 2012-08-27 21:15, Sam Steingold wrote: * jim holtman [2012-08-27 14:55:08 -0400]: Most likely when 'y' is converted to a dataframe (not sure what the function 'write.matrix.csr' does since you did not say where you got it), sorry, library(e1071) '

Re: [R] write.matrix.csr data conversion

2012-08-27 Thread Sam Steingold
> * jim holtman [2012-08-27 14:55:08 -0400]: > > Most likely when 'y' is converted to a dataframe (not sure what the > function 'write.matrix.csr' does since you did not say where you got > it), sorry, library(e1071) > '0' and '1' are converted to factors which probably show up as 1 > and 2 in t

Re: [R] write.matrix.csr data conversion

2012-08-27 Thread jim holtman
Most likely when 'y' is converted to a dataframe (not sure what the function 'write.matrix.csr' does since you did not say where you got it), '0' and '1' are converted to factors which probably show up as 1 and 2 in the file. Here is a quick example: > x <- sample(c(0,1), 20,TRUE) > y <- table(x)

[R] write.matrix.csr data conversion

2012-08-27 Thread Sam Steingold
> write.matrix.csr(mx, y = y, file = file) > table(y) 0 1 5194394 23487 $ cut -d' ' -f1 f | sort | uniq -c 23487 2 5194394 1 i.e., 0 is written as 1 and 1 is written as 2. why? is there a way to disable this? -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X