[R] building a "simple" R package

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun May 2 08:51:00 CEST 2004


Did you read the bits in README.packages which say

  Do not use filepaths with spaces in: you can always use the short forms
  ...

  BEWARE: Don't expect this to work if the path to R_HOME contains spaces.
  It may work, but we don't recommend it.

?  You also appear to be trying to build your package in a filepath with 
spaces in.  So try putting your source files somewhere without spaces in 
the file name.

Or try updating to R 1.9.0, as its CHANGES files says

  R CMD INSTALL/build/check map path names with spaces in to their short
  forms.

so it should work in the current version of R.


On Sat, 1 May 2004, Charles Annis, P.E. wrote:

> Dear R-ers:
> 
> Recognizing that it is better to remain silent and have people think you
> stupid than to speak and remove any doubt, I fear that I must speak
> nonetheless.

A third possibility is to read the READMEs and FAQs.

> I am having the Devil's own time trying to make a simple R package for my
> own use.  Yes, I have perused the FAQs and searched the archives.  Yes, I
> have read "Writing R Extensions" and eventually divined what Rcmd means and
> that it isn’t accessed from an R session.  I downloaded and installed Perl,
> and eventually some Unix tools from
> http://www.murdoch-sutherland.com/Rtools/tools.zip, specifically tar.exe,
> sh.exe, cygwin1.dll, gzip.exe.  I found "package.skeleton" and was able to
> produce the requisite files, and even got "Rcmd build" to progress far
> enough to begin packaging things.  Alas, I am stymied.  As can be seen in
> the screen-dump below, after declaring that tar was building, it was unable
> to proceed.
> 
> I am using R1.8.1 on a WinXP Professional DELL 3 GHz Pentium 4 with 2 Gig
> RAM.  I put all the files mentioned above, including my source folder (I
> only have R routines - no C or FORTRAN) in C:\Program Files\R\rw1081\bin to
> avoid any potential PATH problems.
> 
> Can any kind reader help me?  I realize this shouldn't be this complicated,
> but somehow I have made it thus, and would welcome a helping hand.
> 
> Thank you.
> 
> Charles Annis, P.E.
> 
> ##########  Screen Dump    #########################################
> 
> C:\Program Files\R\rw1081\bin>Rcmd build myPOD
> * checking for file 'myPOD/DESCRIPTION' ... OK
> * preparing 'myPOD':
> * checking whether 'INDEX' is up-to-date ... OK
> * removing junk files
> * building 'myPOD_1.0.tar.gz'
> tar: Files/R/rw1081/bin/myPOD_1.0.tar: Cannot stat: No such file or
> directory
> tar: Error exit delayed from previous errors
> tar: Files/R/rw1081/bin/myPOD_1.0.tar: Not found in archive
> tar: Error exit delayed from previous errors
> tar: Files/R/rw1081/bin/myPOD_1.0.tar: Cannot stat: No such file or
> directory
> tar: myPOD: Cannot stat: No such file or directory
> tar: Error exit delayed from previous errors
> myPOD_1.0.tar: No such file or directory
> 
> Charles Annis, P.E.
>  
> Charles.Annis at StatisticalEngineering.com
> phone: 561-352-9699
> eFax:  503-217-5849
> http://www.StatisticalEngineering.com
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list