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)