Last active
April 15, 2021 13:24
-
-
Save matthew-brett/91ab7aba02553c4137d60c4bcb2385a0 to your computer and use it in GitHub Desktop.
This file contains 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
r_local_dir <- file.path('C:', 'R') | |
r_tmp_dir <- file.path(r_local_dir, 'tmp') | |
r_inst_dir <- file.path(r_local_dir, 'win-library', '4.0') | |
dir.create(r_tmp_dir, recursive=TRUE) | |
dir.create(r_inst_dir, recursive=TRUE) | |
r_user_dir <- Sys.getenv('R_USER') | |
r_env_fn <- file.path(r_user_dir, '.Renviron') | |
write(paste("TMPDIR='", r_tmp_dir, "'", sep=''), r_env_fn) | |
write(paste("R_LIBS_USER='", r_inst_dir, "'", sep=''), r_env_fn, append=TRUE) |
This file contains 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
r_user_dir <- Sys.getenv('R_USER') | |
r_profile_fn <- file.path(r_user_dir, '.Rprofile') | |
write('Sys.setenv(LANG = "en")', r_profile_fn, append=TRUE) | |
write('Sys.setlocale("LC_ALL", "English")', r_profile_fn, append=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment