I'm trying to develop an R package that will include some previously compiled executable programs and their supporting libraries. (I know this is bad form, but it is for internal use).
My question: Does the special exec
and tools
directories have any special functionality within R?
The documentation seems to be sparse. Here is what I've figured out so far:
From here
exec
are marked as executable on installexec
are ignoredexec
is rarely used (my survey of CRAN says tools
is just as rarely used)tools
is around for configuration purposes? Do these directories offer any that I couldn't get from creating an inst/programs
directory?
Rbuildignore is a Perl-compatible regular expression that is matched, without regard to case, against the path to each file in the source package 1. If the regular expression matches, that file or directory is excluded.
When making an R package the inst folder is for files/folders that should be copied unmodified into the installed R package folder.
List functions in R package. Once installed, you can get a list of all the functions in the package. If the package is on CRAN, you will find documentation in PDF format of all functions inside a page like https://cran.r-project.org/web/packages/package_name .
[R-exts] has this to say:
Subdirectory exec could contain additional executable scripts the package needs, typically scripts for interpreters such as the shell, Perl, or Tcl. This mechanism is currently used only by a very few packages. NB: only files (and not directories) under exec are installed (and those with names starting with a dot are ignored), and they are all marked as executable (mode 755, moderated by ‘umask’) on POSIX platforms. Note too that this is not suitable for executable programs since some platforms (including Windows) support multiple architectures using the same installed package directory.
It's quite possible the last note won't apply to you if it's only for internal use.
Nevertheless, I'd suggest avoiding abusing any existing convention that might not apply precisely to your situation, and instead use inst/tools
or inst/bin
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With