[R] Putting together a constantly evolving package
Erik Iverson
eiverson at NMDP.ORG
Tue Sep 15 21:21:14 CEST 2009
Steve,
I can't speak to your exact question, but perhaps suggest a simple alternative. What I do is simply make changes to the .R file containing my code, and use the "source" function to read in the new definitions of my functions while I'm tweaking them. Then, at the end of the day, I do my R CMD INSTALL just once. If you use ESS, this is particularly easy since you can just type C-c C-l to source the current .R file into a running *R* process.
Also, see the Examples section of ?source for a function that sources a bunch of files, presumably all the .R files in your package, at once.
I hope that might help,
Erik
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Steve Lianoglou
Sent: Tuesday, September 15, 2009 2:08 PM
To: R-help at r-project.org
Subject: [R] Putting together a constantly evolving package
Hi all,
I'm putting together some common code + data into a custom package,
everything is working out fine, but the ``R CMD INSTALL MyPackage``
call seems to take a particularly long time in the "**data" step:
$ R CMD INSTALL MyPackage/
* installing to library '/Library/Frameworks/R.framework/Resources/
library'
* installing *source* package ' MyPackage' ...
** R
** data
(here)
I have a handful of not-very-big *.rda files in my data dir, but also
a rather large sqlite db.
Is R trying to do anything in particular to my data during the
install? index or something? Is there anything I can do to make this
step go faster?
If this were a 1-time install, it wouldn't matter, but since this
package is evolving as I'm using it, I find myself constantly needing
to tweak some code here, or change something there, and this always
requires another round of R CMD INSTALLing ...
Is there something I can do to make this cycle turn around quicker?
How do you guys deal with growing a package organically during your
analyses?
For this particular situation, I reckon I can create a separate
package for my dataset since its static (and I might do eventually
down the road, anyway), but I'm wondering if there are other
alternatives.
Thanks,
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
______________________________________________
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