Is there any special functionality in the "exec" or "tools" R packages?

I am trying to develop an R package that will include some previously compiled executables and their supporting libraries. (I know this is a bad form, but it is intended for internal use).

My question is: Are there special exec and tools directories in the special R function?

Documentation seems rare. Here is what I have guessed so far:

From here

  • files contained in exec are marked as executable during installation Subdirectories
  • in exec ignored
  • exec rarely used (my CRAN poll says tools are also rarely used)
  • tools suitable for configuration purposes?

Do these directories offer any that I could not get from creating the inst/programs directory?

+8
r
source share
2 answers

As far as I can tell, here is the functionality offered by the exec and tools directories.

exec

From R-exts using hadley :

The exec subdirectory may contain additional executable scripts needed for the package, usually scripts for interpreters such as shell, Perl or Tcl. This mechanism is currently used by only a few packages. NB: only files (not directories) are installed under exec (and those whose names starting with a period are ignored), and all of them are marked as executable (mode 755, moderated by umask) on POSIX platforms. Also note that this is not suitable for executable programs, as some platforms (including Windows) support multiple architectures using the same directory of installed packages.

exec functions i figured out

  • On POSIX platforms (* nix, os x), files in exec will be marked as executable.
  • The exec subdirectories are not included in the package, only files in exec root
  • (note: it may contain binary executables, but platform architecture / processing is missing.

tools

From R-exts :

Subdirectory tools are the preferred place for auxiliary files needed during setup, and for sources you need to re-create scripts (for example, M4 files for autoconf).

tools I realized that

  • tools - store files used during package compilation
  • All contained files are copied recursively to the source * .tar.gz package (including sub-folders)
  • tools not included in the final, compiled package form. All content is discarded.
+4
source share

[R-exts] has this to say:

The exec subdirectory may contain additional executable scripts packages, usually scripts for interpreters such as shell, Perl or Tcl. This mechanism is currently used by only a few packages. NB: only files (not directories) under exec (and those whose names starting with a period are ignored), and all of them are designated as executable (POSIX mode 755, moderated by umask). Please note that this is not suitable for the executable file of programs, as some platforms (including Windows) support several architectures that use the same directory of installed packages.

Perhaps the last note will not apply to you if it is used for internal use only.

However, I suggest that you avoid abusing any existing agreement that may not be appropriate for your situation, and use inst/tools or inst/bin instead.

+2
source share

All Articles