I’m creating an R package and I need it to include a couple of non R script files which get called by one of my functions. I need these script files to be distributed with the package, naturally. So that leaves me with two questions:
- a) In which directory of the package
tree should I place these files? b) Is that location mandatory or just convention? - Do I need to change any other
settings or configurations or will
they just get copied to the
directory mentioned in #1 and then I
can figure out the path using
system.file()?
I’ve tried to find the answer in the Writing R Extensions document, but it didn’t jump out at me. And, of course, I didn’t read the whole thing. Am I being too honest here?
I think you want either
exec/at the top-level (even though that is labeled ‘still experimental, or subdirectory ofinstas everything ininst/gets copied verbatim into the package.A quick example from the packages I have expanded in source is gdata which has
inst/perl,inst/xlsandinst/bin. These you could then call from R itself by computing the path of the installed package usingsystem.file().