-----Urspr?ngliche Nachricht-----
Von: Rowe, Brian - Eqty NY [mailto:b.rowe at baml.com]
Gesendet: Donnerstag, 14. Oktober 2010 21:35
An: Janko Thyson
Betreff: RE: [Rd] Including data in packages
Janko,
You have to save the data objects you want into that directory in your
source package. Then when you build/install it will be there.
Regards,
Brian
-----Original Message-----
From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-
project.org] On Behalf Of Janko Thyson
Sent: Thursday, October 14, 2010 3:28 PM
To: 'Dirk Eddelbuettel'
Cc: 'r-devel at r-project. org'
Subject: Re: [Rd] Including data in packages
Hi Dirk,
thanks for the quick reply. So all datasets, regardless if they should
be
hidden from the user, should go into /data? If that's the convention,
that's
fine with me. But the problem is that there is no data-directory in
R_HOME/library/2-11.1/mypackage after running R CMD build and R CMD
INSTALL.
I've experimented with the options --binary and --use-zip-data but
without
luck.
I think I don't understand the "optional directory" procedure in
general
yet: don't I just need to dump stuff in /data, /inst/doc, /exec etc.
and
have them "transferred" (sorry, I don't know a better word) to the
tar.gz
and eventually to the installed package?
Regards,
Janko
-----Urspr?ngliche Nachricht-----
Von: Dirk Eddelbuettel [mailto:edd at debian.org]
Gesendet: Donnerstag, 14. Oktober 2010 21:18
An: Janko Thyson
Cc: r-devel at r-project. org
Betreff: Re: [Rd] Including data in packages
On 14 October 2010 at 21:06, Janko Thyson wrote:
| The thing is that I don't understand how the actual 'transfer'
happens when
| the package is build and installed. Where do the objects 'live'
| installation and how can I access them after firing
library(mypackage)? For
| example, there is a 'data' directory for package 'tm'
| (R_HOME/R-2.11.1/library/tm) but such a directory is missing even
I chose
| option 3) (as stated above) to get my data included. Also, how can
| actually execute the lazyload?
If in doubt, copy existing packages, preferably recommended ones:
edd at max:~/src/debian/CRAN$ find -type d -name data | sort
./boot-1.2.42/data
./boot-1.2.43/data
./car-2.0-2/data
./cluster-1.13.1/data
./effects-2.0.10/data
./fEcofin-290.76/data
./fExtremes-2100.77/data
./fGarch-2110.80/data
./fImport-2110.79/data
./fPortfolio-2110.79/data
./gdata-2.8.0/data
./gplots-2.8.0/data
./gtools-2.6.2/data
./lattice-0.19-11/data
./lattice-0.19-13/data
./latticeExtra-0.6-14/data
./lme4-0.999375-35/data
./lmtest-0.9.27/data
./MASS-7.3-7/data
./Matrix-0.999375-44/data
./misc3d-0.7-1/data
./multcomp-1.2-3/data
./nlme-3.1.96/data
./nlme-3.1.97/data
./nws-2.0.0.3/data
./rggobi-2.1.16/data
./robustbase-0.5-0-1/data
./rpart-3.1.46/data
./sandwich-2.2-6/data
./sm-2.2-4.1/data
./sn-0.4-16/data
./strucchange-1.4-1/data
./strucchange-1.4-2/data
./survival-2.35-8/data
./timeSeries-2120.89/data
./tseries-0.10-22/data
./urca-1.2-4/data
edd at max:~/src/debian/CRAN$
The vote is clearly in favour of data/ over inst/data.
Hth, Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com