[R] saving a global workspace?

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Jun 13 09:13:28 CEST 2002


This is what R packages are for: to store R functions which are made
available to each session via library(PackageName).

That's how we manage code for embedded R processes.

BTW, R-1.3.1 is rather old.

On Wed, 12 Jun 2002, Vahid Pazirandeh wrote:

> hi all,
>
> i can't call my custom R function.
>
> i'm using R 1.3.1 on Solaris with the SJava pkg from www.omegahat.org.  This
> package let's me call R functions from Java, and it works great.
>
> i wrote a custom R function and saved it in the workspace.  in my homedir, i
> noticed the file named .RData was created.  i also noticed my workspace is ONLY
> restored if the current working dir (when i run R) is the one with that file in
> it.
>
> i finally wanted to move my command-line driven Java code to become a servlet.
> the servlet works fine if i call built-in R commands like "mean" and pass it
> variables (i can even receive the results from the R call).  however, when i
> attempt to call my saved function, R crashes (and also termintes my servlet
> engine!).
>
> is there a way to save to a global workspace somehow?  i'm thinking the .RData
> file can't be found, so my custom function isn't restored (though i checked the
> current working dir just before the R call from Java, and i made sure to put
> the .RData in that location).
>
> any help would be awesome!
>
> please cc to the following address as i'm not on the mail list:
> vpaziran at yahoo.com
>
>
>
> regards,
> vahid
>
>
> =====
> < NPACI Education Center on Computational Science and Engineering >
> < http://edcenter.sdsu.edu >
>
> "Career is great, but you can’t run your hands through its hair."
> =====
>
> __________________________________________________
>
> Yahoo! - Official partner of 2002 FIFA World Cup
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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