Run the R development version with the stable version

I want to test R package with R-devel under Ubuntu.

I installed R-devel based on http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/2012/08/installing-the-development-version-of-r-on-ubuntu-alongside-the-current -version-of-r.html

and I found a guide for Mac OS. http://www.nicebread.de/how-to-check-your-package-with-r-devel/

I tried R CMD check pkg --as-cran , but it is still a stable version of R that will be used for verification. How to use R-devel for verification?

Thanks in advance!

+7
source share
2 answers

You may have skipped the last step mentioned in the blog post you linked to. You need to modify a number of environment variables to indicate a new development version of R. The message suggests creating a script to run the development version of R:

 #!/bin/bash # This assmues the dev version of R is installed in /usr/local/ export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library::/usr/lib/R/library'} export PATH="/usr/local/lib/R-devel/bin:$PATH" R " $@ " 

You can save this at your location in $PATH and name it, for example, R-devel . Be sure to create the script executable using chmod . Then you can run R-devel as follows:

 R-devel CMD check pkg --as-cran 
+5
source

I have an alternative method based on the recommendations from the bioc-devel mailing list. Assuming you want to install r-devel in your home directory, say in ~/R-devel/ , here is what you do:

First set up your environment variables so that we don’t need to repeat the directory names. Directory for sources and directory for compiled distribution. Of course, they can be anywhere, wherever you are:

 export RSOURCES=~/src export RDEVEL=~/R-devel 

Now get the sources + recommended packages:

 mkdir -p $RSOURCES cd $RSOURCES svn co https://svn.r-project.org/R/trunk R-devel R-devel/tools/rsync-recommended 

Then create R and packages:

 mkdir -p $RDEVEL cd $RDEVEL $RSOURCES/R-devel/configure && make -j 

What, everything is ready. Just save the following in a script executable somewhere to be able to run the development version:

 #!/bin/bash export R_LIBS=~/R-devel/library R " $@ " 

Here is a script that automatically saves the script in the ~ / bin / directory:

 cat <<EOF>~/bin/Rdev; #!/bin/bash export R_LIBS=$RDEVEL/library export PATH="$RDEVEL/bin/:\$PATH" R "\ $@ " EOF chmod a+x ~/bin/Rdev 

Now you can simply run Rdev as if you were running R , and you will have a development version of R that will install packages in $RDEVEL/library .

+4
source

All Articles