[R] Add a third .libPath

Jeff Reichman re|chm@nj @end|ng |rom @bcg|ob@|@net
Wed Dec 2 15:14:50 CET 2020

r-help Forum


My employer has not yet approved R/RStudio but has allowed me to run
R/RStudio from profile.  I need to add RTools but not sure I can run RTools
from the same location.  

So I unzipped Rtools and added the folder to my profile location containing
R and RStudio and then modified my Rprofile adding a third path to the
RTools folder as follows:


# my custom stuff

myPaths <- c(.libPaths(), "\\\\gold/home/ndw003/reichmjs/MyDocs/R/rtools40
<file://gold/home/ndw003/reichmjs/MyDocs/R/rtools40> ")



Not sure if this is the best method but seems to work;


> .libPaths()

[1] "\\\\gold/home/ndw003/reichmjs/MyDocs/R/win-library/4.0
<file://gold/home/ndw003/reichmjs/MyDocs/R/win-library/4.0> "

[2] "\\\\gold/home/ndw003/reichmjs/MyDocs/R/R-40.3/library
<file://gold/home/ndw003/reichmjs/MyDocs/R/R-40.3/library> "

[3] "\\\\gold/home/ndw003/reichmjs/MyDocs/R/rtools40
<file://gold/home/ndw003/reichmjs/MyDocs/R/rtools40> "  


except when I run 


> has_rtools()

WARNING: Rtools is required to build R packages, but is not currently


Please download and install Rtools 4.0 from


I am assuming R isn't seeing Rtools


So can I run Rtools from the same profile location as R and RStudio? IF so
what do I need to do?


Jeff Reichman


	[[alternative HTML version deleted]]

More information about the R-help mailing list