Skip to content

Questions on package creation

1 message · Liaw, Andy

#
I write most of the code in randomForest in Windows, and move to Linux when
I need to debug compiled code.  On my WinXPPro laptop, I have a directory
c:/home/R-packages/RF.  That's where the randomForest source tree lives.
When I'm ready to do some test, I would do (on the command line, in
c:/home/R-packages/RF)

  mkdir test
  R CMD INSTALL -l test randomForest

If the install is OK, I then start up Rterm or Rgui from the directory and
do

  library(randomForest, lib.loc="test")

and play with the package a bit to make sure it looks OK.  Then at the
system command line,

  R CMD check randomForest

If that goes well, I'd do:

  R CMD build --force randomForest
  R CMD build --binary randomForest

and move the .tar.gz and .zip archives to whereever I want them.  Before I
use subversion for version control, I would simply stash away the .tar.gz in
c:/home/R-packages/rf-pkg, which holds the tarball of various versions of
the package.  Not particularly efficient, obviously.

HTH,
Andy