Hi,
> I am dealing with the same issue here and I was wondering whether it would be
> possible to just save
> the R compliled function objects in a directory and just attach the directory
> to the search path.
> (I am using R2.4.0+ESS+Xemacs in windows XP).
The other method that I'm familiar with uses save() and load() rather than
attach. It may be possible to use attach() in some other method.
> temp1 <- function(x) {x * x}
> temp2 <- function(x) {x + x}
> temp1(3)
[1] 9
> temp2(3)
[1] 6
> save(list=ls(), file="testfns")
> q(save="no")
# start R
> ls()
character(0)
> load("testfns")
> ls()
[1] "temp1" "temp2"
My personal preference is the text source file approach, but opinions
obviously vary on that. I do keep "final" versions in a package.
And yes, the proper term is package, but it seems that if the entity
in question is stored in /usr/lib/R/library (on my linux system), and
loaded with the function library() the occasional slip might be forgiven?
Sarah
--
Sarah Goslee
http://www.stringpage.com
http://www.functionaldiversity.org
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.