This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
r_antsr_usage [2017/04/10 18:57] mgstauff [Installing from R] |
r_antsr_usage [2017/04/10 20:28] (current) mgstauff [Local/User Package Installation] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== R ===== | ===== R ===== | ||
+ | |||
+ | ==== Local/User Package Installation ==== | ||
+ | |||
+ | As of R 3.2, R should create a default location for local libraries (i.e. that you install on your own). Check using the '' | ||
+ | |||
+ | R_LIBS_USER will by default be the first line shown by '' | ||
+ | |||
+ | **HOWEVER** if you define R_LIBS, it will be used before R_LIBS_USER in search and installation paths. This can be confusing. For installation, | ||
+ | |||
+ | Some documentation here: | ||
+ | https:// | ||
+ | |||
+ | |||
+ | ==== Managing Packages ==== | ||
+ | |||
+ | Managing packages: | ||
+ | |||
+ | R can read packages from any of the locations listed in .libPaths(). This typically contains both a system directory (under / | ||
+ | |||
+ | To avoid this, use the packrat package (https:// | ||
+ | |||
+ | Packages that don't affect the outcome of studies, like roxygen2 or ggplot2, can be defined as " | ||
==== '' | ==== '' | ||
Line 38: | Line 60: | ||
> install_github(" | > install_github(" | ||
| | ||
- | NOTE about R_LIBS environment variable: | ||
- | As of R 3.2, R should create a default location for local libraries (i.e. that you install on your own). Check using the '' | ||