dear R fans,
Has anyone encountered problems when using
R BATCH under Linux (I have Red Hat 5.2 if
that matters) ?
I have a file that works fine if I copy-paste it
interactively in a R session. However R
complains right away when I try to run the file in
batch mode. This problem is not inherent to R 0.64.1 I
am using now. I had the same problem with previous
releases. Also I am not using an RPM version.
R was compiled with gcc 2.7.2.3.
It is not systematic. For example, the following
trivial example works fine:
file example:
x <- rnorm(10)
y <- 2*x + 1 + rnorm(x,0,0.1)
thefit <- lsfit(x,y)
% R BATCH example example.out
% more example.out
R : Copyright 1999, The R Development Core Team
Version 0.64.1 (May 8, 1999)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help,
or
"help.start()" for a HTML browser interface to help.
Type "q()" to quit R.
[Previously saved workspace restored]
> invisible(options(echo = TRUE))
> x <- rnorm(10)
> y <- 2*x + 1 + rnorm(x,0,0.1)
> thefit <- lsfit(x,y)
> proc.time()
[1] 0.98 0.03 0.00 0.00 0.01>
The cases I remember having problems with include
a read.table. This might be the source of the problem.
I dunno.
Thanks for any help.
Christian
% R BATCH collab2.R collab2.R.out
collab2.R.out:
R : Copyright 1999, The R Development Core Team
Version 0.64.1 (May 8, 1999)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help,
or
"help.start()" for a HTML browser interface to help.
Type "q()" to quit R.
> invisible(options(echo = TRUE))
> # read in the raw data
> complete.user.data <- read.table("userdata.txt",header=T)
Error: syntax error
Execution halted
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._