Hi, I wanted to create even something simple-r than little-r or Rscript. I even use Rscript in simple-r (but with clunky github interface it is difficult to decipher it). The idea is that the first command that I always end up executing in R is d<-read.table('in.txt', ...). Then, I either plot the data set, fit a function to it or calculate some simple statistics (e.g. min, mean, cor, etc..). Only after making sure that everything is fine with it, I might calculate something more complicated. I wanted to replace the first step with less keystrokes and be able to use Linux pipes, since most of the initial data transformation is done using Perl. So, to calculate correlation for a file with two columns, I would have to type: 'r cor file.txt', rather than d<-read.table..., to get sum of the first column: 'r -k1 sum file.txt', to find standard deviation: "perl -walne 'blah regexp print $F[0]' file.txt | r sd -", to plot my perl-extracted dataset: "perl -walne 'regexp blah' | r -dp -". It has few more perks, but running full R is always an option. Tomek P.S. I moved it to Google Code, for easier access: http://code.google.com/p/simple-r/
> Subject: Re: [R] Command line r > From: pda...@gmail.com > Date: Wed, 2 Oct 2013 13:04:04 +0200 > CC: rto...@outlook.com; r-help@r-project.org > To: chainsawti...@gmail.com > > > On Oct 2, 2013, at 11:07 , C.H. wrote: > > > Have a look at the littler. > > > > http://dirk.eddelbuettel.com/code/littler.html > > > > Or Rscript (comes standard with R) for that matter: > > $ echo '2+2' | Rscript - > [1] 4 > > -pd > [[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.