Skip to content
Prev 872 / 12125 Next

[R-pkg-devel] How to link executables for non-R-users?

I really like the possibility of projects like docopt <http://docopt.org>, providing a bash interface to R functionality. IMHO this is a great way to allow non-R-users to include R functionality in their workflows. There is a docopt package for R which is not yet perfect for my liking, but already goes a long way. <https://cran.r-project.org/web/packages/docopt/index.html> 

I have been experimenting a bit with including docopt scripts into my R packages, and I would like to ask for some feedback how to handle the distribution of such bash-interfaces with R packages.

Ideally, such bash-interfaces like docopt should be distributed together with the R packages, and the ?exec? folder seems destined for that goal. Simply adding the package docopt as a requirement in DESCRIPTION also assures that everything just works after installing the package!

The main remaining problem is the following: How do non-R-users actually find the bash-executable? The location is rather hidden away :-). Is there a way to link the path to the exec folder to PATH on installing a package? Or is there an easy way to allow people to make an alias in their .bashrc?