forked from ISTI-ansible-roles/ansible-roles
library/roles/R/templates/Rprofile.site.j2: Set the R locale inherithing the system one. See https://support.d4science.org/issues/12227
This commit is contained in:
parent
71d08bafe7
commit
5a6206d79d
|
@ -8,6 +8,15 @@
|
||||||
# NOTE: managed by ansible
|
# NOTE: managed by ansible
|
||||||
#
|
#
|
||||||
local({r <- getOption("repos")
|
local({r <- getOption("repos")
|
||||||
r["CRAN"] <- "{{ r_cran_mirror_site }}"
|
r["CRAN"] <- "{{ r_cran_mirror_site }}"
|
||||||
options(repos=r)
|
options(repos=r)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Explicitly set the R encoding using the system one, if it exists
|
||||||
|
if (file.exists("/etc/default/locale")) {
|
||||||
|
readRenviron("/etc/default/locale")
|
||||||
|
LANG <- Sys.getenv("LANG")
|
||||||
|
if(nchar(LANG))
|
||||||
|
Sys.setlocale("LC_ALL", LANG)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue