Thanks.
R.
On Thursday 23 November 2006 16:32, Prof Brian Ripley wrote:
On Thu, 23 Nov 2006, Ramon Diaz-Uriarte wrote:
On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote:
Try this:
gannet% cat month.R
x - commandArgs()
print(x[length(x)])
gannet% R --slave --args
I wish to use R CMD BATCH to run a small R function which reads a text
file and plots a single graph to a PDF file.
version
_
platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
Patrick Connolly p_connolly at ihug.co.nz writes:
What I'd like to do is avoid the need to make the Month.r files and
have the script pass the month information directly to the function
that a single .r file would call.
?commandArgs
__
Try this:
gannet% cat month.R
x - commandArgs()
print(x[length(x)])
gannet% R --slave --args January month.R
[1] January
On Thu, 23 Nov 2006, Patrick Connolly wrote:
I wish to use R CMD BATCH to run a small R function which reads a text
file and plots a single graph to a PDF file.
On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote:
Try this:
gannet% cat month.R
x - commandArgs()
print(x[length(x)])
gannet% R --slave --args January month.R
[1] January
Is the above
R --slave --args January month.R
the preferred way of using it?
I tend to use
R
On Thu, 23 Nov 2006, Ramon Diaz-Uriarte wrote:
On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote:
Try this:
gannet% cat month.R
x - commandArgs()
print(x[length(x)])
gannet% R --slave --args January month.R
[1] January
Is the above
R --slave --args January month.R
the
On Thu, 23-Nov-2006 at 02:44PM +, Prof Brian Ripley wrote:
| Try this:
|
| gannet% cat month.R
| x - commandArgs()
| print(x[length(x)])
|
| gannet% R --slave --args January month.R
| [1] January
That's exactly what I needed. Thank you Brian for a concise and
thorough answer.
--