Skip to content

Work with packages without using R CMD build/install

4 messages · KarstenW, Uwe Ligges, Gabor Grothendieck +1 more

#
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
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.
#
KarstenW wrote:
No.

Uwe Ligges
#
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:
#
On 16/09/2008 8:12 AM, KarstenW wrote:
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