Here are some of my notes based on a toe-dipping into R
Tips:
- use .libPaths() to get the path where the libraries are located:
- > .libPaths() –> this is in RGui
[1] “C:/Users/agoswami/Documents/R/win-library/3.3”
[2] “C:/Program Files/R/R-3.3.0/library”
- > .libPaths() –> this is in RGui
- One can look for the Rprofile file like so:
- $ find . -name ‘*Rprofile’ -type f 2>/dev/null
./Microsoft/MRO/R-3.2.5/library/base/R/Rprofile –> this is MRO (Microsoft R Open)
./Microsoft/MRO-for-RRE/8.0/R-3.2.2/library/base/R/Rprofile –> this is MRS (Microsoft R Server)
./Microsoft SQL Server/130/R_SERVER/library/base/R/Rprofile –> this is MRS (Microsoft R Server) through SQL install
./R/R-3.3.0/library/base/R/Rprofile –> this is a regular R install
- $ find . -name ‘*Rprofile’ -type f 2>/dev/null
- To look at packages available, use the following:
- https://www.r-bloggers.com/list-of-user-installed-r-packages-and-their-versions/
-
ip <- as.data.frame(installed.packages()[,c(1,3:4)]) rownames(ip) <- NULL ip <- ip[is.na(ip$Priority),1:2,drop=FALSE] print(ip, row.names=FALSE)
- this shows the difference in the packages between MRO, MRS and Base R
References:
- http://blog.revolutionanalytics.com/2015/11/r-projects.html
- http://stackoverflow.com/questions/15170399/changing-r-default-library-path-using-libpaths-in-rprofile-site-fails-to-work
- https://github.com/lixzhang/MLADS2016June
Advertisements