[R] Passing a workspace file as argument
Marcus Eger
eger.m at gmx.de
Thu May 10 10:46:59 CEST 2001
Victor Moreno wrote:
>
> What is the best way (if possible) to pass the name of a workspace file to R
> when it starts so it is loaded instead of .RData ?
>
> I would like to know this for Linux and windows version. For windows I would
> like to associate the .RData extension so doubleclicking the file starts R
> and loads it.
>
Hi!
I needed different .RData files for different computers linked via nfs
in
order not to overwrite configurations. I did the following:
".First" <- function ()
{
image <- paste(".RData.",Sys.getenv("HOSTNAME"),sep="")
print("restoring session <",image,"> ...")
load(image,globalenv())
if (interactive()) options(error=quote(dump.frames()))
else options(error=quote({dump.frames(to.file=TRUE); q()}))
options(warn=1)
gc()
}
marcusE
--
+-------------------------------------------------------
| Marcus Eger
| Philipps Universitaet Marburg
| Fachbereich Physik AG Neurophysik
| Renthof 7
| 35032 Marburg
| Tel. ++49 +6421 282-4169
| Fax ++49 +6421 282-7034
+-------- ><> -------------------------------------------
| E-Mail: eger.m at gmx.de (NEW)
| marcus.eger at physik.uni-marburg.de (OLD)
| WWW: http://neuro.physik.uni-marburg.de/~eger (NEW)
+--------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list