[R] Execute a list of R instructions from a file

From: pau carre <pau.carre_at_gmail.com>
Date: Mon 23 Jan 2006 - 09:02:05 EST


Hello, I want to do the following: First, generate an R code in a file from an external program, then send the name of the file to R using sockets, finally let R to open that file and to execute the R code. I just wanted to know if there is any function in R that reads a file an executes the R code inside it.

Something like:
file.txt:
state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa", "qld", "vic")

R execution:
>readAndExecute(file.txt)

Thanks
Pau.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jan 23 09:09:31 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:09 EST