Hi, I have a couple of quick questions regarding R.
<- snip ->
3) Is there anyway that I could save functions that I have written outside of R. That is, could I write functions and have them saved in some directory, such as, C:\Programs\RLanguage\RobFunctions\? This way I would be able to copy the functions to other pcs. This is very simple in MatLab. Please let me know.
Yes. Here are two ways.
- 1 -
In the directory where you have your function definitions, load the functions into R. Quit R, and say "yes" when asked whether or not to save the workspace image. Find the file in which the image is saved, copy it to the other pcs. On the other pcs, use the "attach" function to attach that file. The functions are now available.
-2-
Go get the R Extensions manual, learn how to create a package. Take your functions, make them into a package. Copy the package file to the other pcs. Use R's "install package" functionality to install the package. Then, whenever the functions are needed, use the "library" command to load your package.
Thanks for the help.
Rob
-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
