Re: [R] Calling library functions from outside R

2009-06-18 Thread Dirk Eddelbuettel
On 18 June 2009 at 14:02, Jim Nemesh wrote: | Actually, I'm going to take by my comments. | | You can use Rscript with multiple -e arguments to do what I was | looking for: | | Rscript -e 'library(broadgap.hapmaptools)' -e 'processAllFiles(dir="/ | humgen/cnp04/sandbox/steve/1m/hapmap3/genot

Re: [R] Calling library functions from outside R

2009-06-18 Thread Jim Nemesh
Actually, I'm going to take by my comments. You can use Rscript with multiple -e arguments to do what I was looking for: Rscript -e 'library(broadgap.hapmaptools)' -e 'processAllFiles(dir="/ humgen/cnp04/sandbox/steve/1m/hapmap3/genotypes/ftp.hapmap.org/genotypes/2008-07_phaseIII/hapmap_form

Re: [R] Calling library functions from outside R

2009-06-18 Thread Gabor Grothendieck
On Thu, Jun 18, 2009 at 1:54 PM, Jim Nemesh wrote: > I did look at ?Rscript.  My question there was: >>> >>> Unfortunately, it looks like each expression is evaluated separately. >>> Is there a way to evaluate multiple expressions in the same >>> environment to make the above work? > > I could writ

Re: [R] Calling library functions from outside R

2009-06-18 Thread Jim Nemesh
I did look at ?Rscript. My question there was: Unfortunately, it looks like each expression is evaluated separately. Is there a way to evaluate multiple expressions in the same environment to make the above work? I could write an Rscript client file, but it's still poor CLI support compared

Re: [R] Calling library functions from outside R

2009-06-18 Thread Gabor Grothendieck
See the getopt R package and have a look at ?Rscript Also on Windows see Rscript.bat and #Rscript.bat in http://batchfiles.googlecode.com and on Linux see: http://dirk.eddelbuettel.com/code/littler.html On Thu, Jun 18, 2009 at 1:25 PM, Jim Nemesh wrote: > I develop quite a bit of R code that I t

[R] Calling library functions from outside R

2009-06-18 Thread Jim Nemesh
I develop quite a bit of R code that I tend to distribute, or let other people embed in their software. One of the things I'd really like to do is find a way to load an R library I've developed, and call one function with arguments. Currently, I achieve that by building a separate R client