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
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.
On Feb 4, 2013, at 11:37 AM, Rich Shepard 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?Wouldn't this just be: save(itis.table, file="/usr/lib/R/library/bio.infer/data/itis.ttable.rda") ???? -- David Winsemius Alameda, CA, USA
Blast! -- dumb typo: On Wed, Feb 6, 2013 at 8:14 PM, Bert Gunter <bgunter at gene.com> wrote:> Just wanted to point out... > > On Wed, Feb 6, 2013 at 7:20 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote: >> On Wed, 6 Feb 2013, David Winsemius wrote: >> >>> Wouldn't this just be: >>> save(itis.table, file="/usr/lib/R/library/bio.infer/data/itis.ttable.rda") >> >> >> David, >> >> Almost certainly. I did not find the save function in the indices of my R >> library or the R data doc. Now I know it exists I'll read about it then save >> the local copy to the bio.infer directory. >> >> I found 'load' in the indices but not 'save.' > > "save" is in the seealso links of ?load > > -- Bert > >> >> Much appreciated, >> >> 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. > > > > -- > > Bert Gunter > Genentech Nonclinical Biostatistics > > Internal Contact Info: > Phone: 467-7374 > Website: > http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm