[R] Modifying Package Data
MacQueen, Don
macqueen1 at llnl.gov
Wed Feb 6 21:34:01 CET 2013
My sense is that even if this were possible (which I doubt), it would be
outside the scope of what would be considered appropriate in R (assuming I
understand the question). After all, it's someone else's package, theirs
to control and maintain, etc. What if it's an installation of R on a
multi-user platform, and other users might use the same package but not
want the modified data?
I would likely save the modified data frame with a slightly different
name, arrange some way to make it easily available, and then just use it,
rather than the original. There are various ways to make it readily
available.
If I always wanted the data to be available when I load the package, what
I might do is download the source package, make a copy of it, modify the
data object in the copy, rename the package (slightly), then build and
install it. Then I would just load the modified package instead of the
original.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 2/4/13 11:37 AM, "Rich Shepard" <rshepard at appl-ecosys.com> wrote:
> The bio.infer package contains a data frame
>/usr/lib/R/library/bio.infer/data/itis.ttable.rda that needs to be
>modified.
>After loading the bio.infer package and attaching the data frame with the
>data() function, I wrote the data frame to a text file.
>
> After adding another row to the data frame I applied read.table() to
>create a data frame, but it's in my pwd, not the R library data
>subdirectory
>for the bio.infer package.
>
> What is the R function to copy/save/write either the text file or the
>local copy of itis.ttable to
>/usr/lib/R/library/bio.infer/data/itis.ttable.rda?
>
>Thanks,
>
>Rich
>
>______________________________________________
>R-help at r-project.org 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.
More information about the R-help
mailing list