[R] Two questions about the creating new package
Song Baiyi
song.baiyi at udo.edu
Tue Dec 2 16:34:14 CET 2003
Hello everyone,
I am just trying to colloct all my function into a new packages. I met
two questions which hurt me so much:
1. when I use the "prompt" to help to write Rd file for a variable x
which is character vector, say x <- c("a","b"), it always give the error
informaion:
Error in get(x, envir, mode, inherits) : variable "a" was not found.
Obvious it regards the "a" as the variable name instead of the item of a
vector. So how can I put a character vector into the pacakge, or it must
be a data.frame to put into a package?
2. Also about the constant character vector. I have a constant vector
which record the column names. I hope when the package is loaded, this
vector will be loaded without explict writing "data(***)". Therefore the
users and other functions can use it. How can I do it? A more generate
question is where should I put those R codes which will be excuted after
the package is loaded?
Thank you very much!
Baiyi Song
Computer engineering institute
Dortmund University
More information about the R-help
mailing list