0

I would like to create an R package that relies on executables that I put into the /inst folder. However, whatever I put in /inst loses the execution bit after the package is installed, hence the binaries become non-executable due to the missing bit. Is there a way to preserve the file mode for files in /inst or these execution bits need to be added post installation? If so, anyone knows how?

Appreciate any inputs

axiom
  • 406
  • 1
  • 4
  • 16
  • I think you should put it in `/data`, see http://r-pkgs.had.co.nz/data.html – moodymudskipper Nov 15 '17 at 10:30
  • When i put the stuff in **/data**, then it doesn't even show up in the package folder after installation. – axiom Nov 15 '17 at 10:43
  • Same question here https://stackoverflow.com/questions/47083455/executable-script-in-r-package-inst Unfortunately no answer – axiom Nov 15 '17 at 11:51
  • 1
    This is by design. You're encouraged _not to do this_ [by CRAN](https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-structure) and your pkg will likely never see CRAN if you do. – hrbrmstr Nov 15 '17 at 12:12
  • The target audience of this package is internal users, so it doesn't need to see CRAN. After going through the document, it looks like the only option is to use **cleanup** script to add the execution bits after installation. Is that correct? – axiom Nov 15 '17 at 13:36

0 Answers0