Last active
October 21, 2019 23:48
-
-
Save benfasoli/268c55ba75f33a997c58f8fcc46dd3af to your computer and use it in GitHub Desktop.
Configure R for user-scoped package management
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wget https://gist.github.com/benfasoli/268c55ba75f33a997c58f8fcc46dd3af/raw/ -O - | bash | |
mkdir -p $HOME/.Rpackages && \ | |
echo "system('source $HOME/.bashrc') | |
.libPaths( | |
c( | |
'$HOME/.Rpackages', | |
.libPaths() | |
) | |
) | |
local({ | |
repo <- getOption('repos') | |
repo['CRAN'] <- 'https://cloud.r-project.org/' | |
options(repos = repo) | |
})" > $HOME/.Rprofile | |
echo " | |
R_USER=$(whoami) | |
R_LIBS=$HOME/.Rpackages | |
" > $HOME/.Renviron |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment