From edd at debian.org  Thu Oct 14 21:17:41 2010
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 14 Oct 2010 14:17:41 -0500
Subject: [Rd] Including data in packages
In-Reply-To: <008a01cb6bd2$f380f490$da82ddb0$@thyson@ku-eichstaett.de>
References: <008a01cb6bd2$f380f490$da82ddb0$@thyson@ku-eichstaett.de>
Message-ID: <19639.22357.354666.280008@max.nulle.part>


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' after
| 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 if I chose
| option 3) (as stated above) to get my data included. Also, how can I
| 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



[Rd] Including data in packages
Dirk Eddelbuettel