Hello, for my small project I would like to organize the data, functions and documentation as a package. I have already created a skeleton directory structure with DESCRIPTION file and put some files in the R, man and data subdirectories. Now I would like to work on the package without calling R CMD build/install after each change. In fact, I do not have the build tools installed yet (I am on Windows) and hope to get along without them (using r-forge). Currently, I do not plan to use C or Fortran extensions. But when I run in the R (2.7.2) console> library(mypkg, lib.loc="mypath")the system answers that there is no package named 'mypkg'. Is it possible to use the package infrastructure without calling R CMD ... after each change? Kind regards, Karsten Weinert. -- View this message in context: http://www.nabble.com/Work-with-packages-without-using-R-CMD-build-install-tp19510486p19510486.html Sent from the R help mailing list archive at Nabble.com.
KarstenW wrote:> Hello, > > for my small project I would like to organize the data, functions and > documentation as a package. > > I have already created a skeleton directory structure with DESCRIPTION file > and put some files in the R, man and data subdirectories. > > Now I would like to work on the package without calling R CMD build/install > after each change. In fact, I do not have the build tools installed yet (I > am on Windows) and hope to get along without them (using r-forge). > Currently, I do not plan to use C or Fortran extensions. > > But when I run in the R (2.7.2) console > >> library(mypkg, lib.loc="mypath") > > the system answers that there is no package named 'mypkg'. > > Is it possible to use the package infrastructure without calling R CMD ... > after each change?No. Uwe Ligges> > Kind regards, > Karsten Weinert.
Gabor Grothendieck
2008-Sep-16 14:29 UTC
[R] Work with packages without using R CMD build/install
If you don't use a namespace then you can use R CMD to build and install it at the beginning and then as you make changes just source() the changed .R files from the R source directory. That will let you run with those changes before they have been built and installed. On Tue, Sep 16, 2008 at 8:12 AM, KarstenW <K.Weinert at gmx.net> wrote:> > Hello, > > for my small project I would like to organize the data, functions and > documentation as a package. > > I have already created a skeleton directory structure with DESCRIPTION file > and put some files in the R, man and data subdirectories. > > Now I would like to work on the package without calling R CMD build/install > after each change. In fact, I do not have the build tools installed yet (I > am on Windows) and hope to get along without them (using r-forge). > Currently, I do not plan to use C or Fortran extensions. > > But when I run in the R (2.7.2) console > >> library(mypkg, lib.loc="mypath") > > the system answers that there is no package named 'mypkg'. > > Is it possible to use the package infrastructure without calling R CMD ... > after each change? > > Kind regards, > Karsten Weinert. > -- > View this message in context: http://www.nabble.com/Work-with-packages-without-using-R-CMD-build-install-tp19510486p19510486.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >
Duncan Murdoch
2008-Sep-16 14:40 UTC
[R] Work with packages without using R CMD build/install
On 16/09/2008 8:12 AM, KarstenW wrote:> Hello, > > for my small project I would like to organize the data, functions and > documentation as a package. > > I have already created a skeleton directory structure with DESCRIPTION file > and put some files in the R, man and data subdirectories. > > Now I would like to work on the package without calling R CMD build/install > after each change. In fact, I do not have the build tools installed yet (I > am on Windows) and hope to get along without them (using r-forge). > Currently, I do not plan to use C or Fortran extensions. > > But when I run in the R (2.7.2) console > >> library(mypkg, lib.loc="mypath") > > the system answers that there is no package named 'mypkg'. > > Is it possible to use the package infrastructure without calling R CMD ... > after each change?The install.packages() function can call the script for you, but it's a little tricky, because it might fail if you have the package loaded. It would be nice if there were a reinstall.packages() function that could reliably unload a package before calling install.packages, but currently there isn't. Duncan Murdoch