The utils package has a misc folder, and some other packages have folders that are not listed in the R-extensions documentation (?data?, ? demo?, ?exec?, ?inst?, ?man?, ?po?, ?src?, and ?tests?). I'd like to be able to put some ancillary data into a misc folder, but it's mere presence in the source folder or source tarball (created with R CMD build) does not mean that it gets put into the zip file (I'm using Windoze) for the package. How do I get an extra, nonstandard subdirectory into a package? Thanks. Dave [[alternative HTML version deleted]]
make "misc" a subfolder of "inst" hth Matthias On 24.08.2012 19:32, David L Lorenz wrote:> The utils package has a misc folder, and some other packages have > folders that are not listed in the R-extensions documentation (?data?, ? > demo?, ?exec?, ?inst?, ?man?, ?po?, ?src?, and ?tests?). I'd like to be > able to put some ancillary data into a misc folder, but it's mere presence > in the source folder or source tarball (created with R CMD build) does not > mean that it gets put into the zip file (I'm using Windoze) for the > package. > How do I get an extra, nonstandard subdirectory into a package? > Thanks. > Dave > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Prof. Dr. Matthias Kohl www.stamats.de
You put it into a subdirectories of inst, like PACKAGENAME/inst/extdata which gets install to PACKAGENAME/extdata See R-extentions. Kasper On Fri, Aug 24, 2012 at 1:32 PM, David L Lorenz <lorenz@usgs.gov> wrote:> The utils package has a misc folder, and some other packages have > folders that are not listed in the R-extensions documentation (?data?, ? > demo?, ?exec?, ?inst?, ?man?, ?po?, ?src?, and ?tests?). I'd like to be > able to put some ancillary data into a misc folder, but it's mere presence > in the source folder or source tarball (created with R CMD build) does not > mean that it gets put into the zip file (I'm using Windoze) for the > package. > How do I get an extra, nonstandard subdirectory into a package? > Thanks. > Dave > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
On 24 August 2012 at 12:32, David L Lorenz wrote: | The utils package has a misc folder, and some other packages have | folders that are not listed in the R-extensions documentation (?data?, ? | demo?, ?exec?, ?inst?, ?man?, ?po?, ?src?, and ?tests?). I'd like to be | able to put some ancillary data into a misc folder, but it's mere presence | in the source folder or source tarball (created with R CMD build) does not | mean that it gets put into the zip file (I'm using Windoze) for the | package. | How do I get an extra, nonstandard subdirectory into a package?>From the 'Writing R Extensions' manual, Section 1.1.3 "Package subdirectories":The contents of the `inst' subdirectory will be copied recursively to the installation directory. Subdirectories of `inst' should not interfere with those used by R (currently, `R', `data', `demo', `exec', `libs', `man', `help', `html' and `Meta', and earlier versions used `latex', `R-ex'). The copying of the `inst' happens after `src' is built so its `Makefile' can create files to be installed. Prior to R 2.12.2, the files were installed on POSIX platforms with the permissions in the package sources, so care should be taken to ensure these are not too restrictive: `R CMD build' will make suitable adjustments. To exclude files from being installed, one can specify a list of exclude patterns in file `.Rinstignore' in the top-level source directory. These patterns should be Perl-like regular expressions (see the help for `regexp' in R for the precise details), one per line, to be matched(10) against the file and directory paths, e.g. `doc/.*[.]png$' will exclude all PNG files in `inst/doc' based on the (lower-case) extension. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
Reasonably Related Threads
- R CMD check message: "The following files should probably not be installed"
- unzip does not like a / at the end of path.
- system.file() to read a text file from a vignette
- Example input data with example output using relative pathway in vignette of R package?
- R CMD build error with data files