Michal Burda
2018-Feb-01 08:23 UTC
[Rd] Error message: 'Rscript' should not be used without a path
Dear R-devel members, recently, I ran into the following error message (R-devel 2018-01-31): 'Rscript' should not be used without a path -- see par. 1.6 of the manual I would like to know more about it, why is it required to run Rscript with a path, and where is that par. 1.6 of the manual. I get this error message during Travis r-devel build of my package for generating makefiles. I am developing a makefile generator package, which contains testthat unit tests that generate and run various makefiles in /tmp. These makefiles run several "Rscript -e" commands. Everything works OK on R-stable on Linux as well as on Windows, the only problem is with R-devel on that Travis cloud builder. Could someone give me more information about that error? Is there any workaround or do I really need to obtain somehow the full path of Rscript and put it into the makefiles (as it may be tricky for such makefile work on linux, macOs and Windows)? Thanks, in advance. Michal Burda [[alternative HTML version deleted]]
Tomas Kalibera
2018-Feb-01 12:22 UTC
[Rd] Error message: 'Rscript' should not be used without a path
Hi Michal, On 02/01/2018 09:23 AM, Michal Burda wrote:> Dear R-devel members, > > recently, I ran into the following error message (R-devel 2018-01-31): > > 'Rscript' should not be used without a path -- see par. 1.6 of the manual > > I would like to know more about it, why is it required to run Rscript with > a path, and where is that par. 1.6 of the manual.The manual is "Writing R Extensions" https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Writing-portable-packages " Do not invoke R by plain R, Rscript or (on Windows) Rterm in your examples, tests, vignettes, makefiles or other scripts. As pointed out in several places earlier in this manual, use something like "$(R_HOME)/bin/Rscript" "$(R_HOME)/bin$(R_ARCH_BIN)/Rterm" with appropriate quotes (as, although not recommended, R_HOME can contain spaces). " This is needed to make sure that one does not run Rscript from a different version of R installed in the system. The quotes are important and it works on all platforms supported by R. (for similar questions perhaps R-package-devel is a bit better list) Best Tomas> > I get this error message during Travis r-devel build of my package for > generating makefiles. I am developing a makefile generator package, which > contains testthat unit tests that generate and run various makefiles in > /tmp. These makefiles run several "Rscript -e" commands. Everything works > OK on R-stable on Linux as well as on Windows, the only problem is with > R-devel on that Travis cloud builder. Could someone give me more > information about that error? Is there any workaround or do I really need > to obtain somehow the full path of Rscript and put it into the makefiles > (as it may be tricky for such makefile work on linux, macOs and Windows)? > > Thanks, in advance. > > > Michal Burda > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Reasonably Related Threads
- Use of R and Rscript in configure/Makevars in packages
- Calling Rscript from Makevars
- How to make an R package that uses Boost.Thread, qualified to be published on CRAN or shared by the most
- Change Rscript and `/usr/lib/R/bin/R` relation
- regenerate Rscript after moving R installation