library() attached read-only.
You could use attach() instead.
Also, you might like to use
createChapter()
sourceChapter()
Tim Hesterberg
>I am trying to create a library and load data and
>functions into that library. I get the following
>error message when I run the code:
>
>Problem in assign(mylib.funcs[1], get(mylib.funcs[1]),
>wh..: database "mylib" is read-only
>Use traceback() to see the call stack
>
>
>#
>#code
>#
>
>
>mkdir("c:\\temp\\mylib")
>mkdir("c:\\temp\\mylib\\.Data")
>mkdir("c:\\temp\\mylib\\.Prefs")
>mkdir("c:\\temp\\mylib\\.Data\\_Help")
>
>my.sqrt <- function(x)
>{
> y <- sqrt(x)
> cat("\nThe square root of ", x, " is ", y, ".\n", sep
>= "")
> invisible(y)
>}
>
>library(mylib, pos=2, lib.loc = "c:\\temp\\")
>mylib.funcs<-c("my.sqrt")
>assign(mylib.funcs[1], get(mylib.funcs[1]),where=2)
========================================================
| Tim Hesterberg Research Scientist |
| timh@insightful.com Insightful Corp. |
| (206)802-2319 1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax) Seattle, WA 98109-3012, U.S.A. |
| www.insightful.com/Hesterberg |
========================================================
Download the S+Resample library from www.insightful.com/downloads/libraries
Two Research Scientist positions:
data mining
frailty/mixed effects
http://www.insightful.com/company/jobs.asp
Speak out about biased science in Washington D.C.
http://home.comcast.net/~timhesterberg/ScientificIntegrity.html
|