Chessxm
2009-May-06 23:45 UTC
[Rd] Can we generate exe file using R? What is the maximum file size valid?
Dear all, I have two questions. First, I am wondering whether we are able to use R to generate an exe file, or sth that can be executable outside R? Second, I am wondering whether read.csv can read a csv file with size of 300-400 gigabytes? Thank you very much! Min [[alternative HTML version deleted]]
cls59
2009-May-07 04:38 UTC
[Rd] Can we generate exe file using R? What is the maximum file size valid?
Chessxm wrote:> > Dear all, > > I have two questions. > > First, I am wondering whether we are able to use R to generate an exe > file, > or sth that can be executable outside R? > > >It sounds as though you are looking for something similar to Matlab's mcc compiler that allows Matlab code to be compiled and run independently from the program by translating a script into C code. To my knowledge there are only two projects that have attempted something similar and both never progressed much past the experimental phase. The first was called Scompile and was created by a fellow named Matt Calder. The project has been defunct for a long time, but you might find some info at: http://www.stat.cmu.edu/~hseltman/Scompile.html Another recent project is r2c hosted at http://www.rforge.net . Both of these programs are extremely limited in the types of scripts they can convert and are probably wouldn't provide workable solution for a set of general R scripts. Your best shot at portability is probably to pack your code and/or data up into an R package- that way it can be easily loaded on to any computer which has R installed. Creating a package from an existing collection of R scripts and data objects is very, very easy- see ?package.skeleton() and the "Writing R Extensions" manual for starting points. Chessxm wrote:> > Second, I am wondering whether read.csv can read a csv file with size of > 300-400 gigabytes? > > Thank you very much! > > Min > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >The problem here is that R likes to store all of it's variables in local RAM- allocating a data frame for 300+ gigabytes worth of information is likely to exceed your machine capacity. Many good workarounds exist for this- most of them function by storing the variable in a database file and only loading and accessing the parts that are needed at a given moment. See the package "filehash" for an example of how to do this. Hope this helps! -Charlie ----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/Can-we-generate-exe-file-using-R--What-is-the-maximum-file-size-valid--tp23417745p23420090.html Sent from the R devel mailing list archive at Nabble.com.
Uwe Ligges
2009-May-07 11:23 UTC
[Rd] Can we generate exe file using R? What is the maximum file size valid?
Chessxm wrote:> Dear all, > > I have two questions. > > First, I am wondering whether we are able to use R to generate an exe file, > or sth that can be executable outside R?No, there is no compiler for R.> Second, I am wondering whether read.csv can read a csv file with size of > 300-400 gigabytes?No. You won't find many machines around that support more than 400 Gb for a single process. Uwe Ligges> > Thank you very much! > > Min > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Stavros Macrakis
2009-May-07 13:26 UTC
[Rd] Can we generate exe file using R? What is the maximum file size valid?
On Wed, May 6, 2009 at 7:45 PM, Chessxm <chessxm@gmail.com> wrote:> First, I am wondering whether we are able to use R to generate an exe file, > or sth that can be executable outside R? >Emacs creates self-contained exe files using a library called 'unexec'; this allows all initialization, library loading, etc. to run first, then dumps out a runnable exe image. I don't know if anyone has worked on this for R. Second, I am wondering whether read.csv can read a csv file with size of> 300-400 gigabytes?Well, R data is normally held in main memory (RAM), so it would not be practical on normal machines to have 300-400 GB of data. There is a big.memory package, but I don't know anything about it. If you want to select a small subset of the very large file to work on, you could certainly read it in in blocks of lines and only keep the data you care about. -s [[alternative HTML version deleted]]
Matthew Dowle
2009-May-13 20:17 UTC
[Rd] Can we generate exe file using R? What is the maximum file size valid?
Does Ra get close to compiled R ? "The R code is compiled on the fly to bytecode which is executed internally by an interpreter in C." The timing tests look impressive. http://www.milbo.users.sonic.net/ra/