Skip to content

R CMD check: Locale not set to C?

1 message · Tobias Setz

#
I just wanted to share my findings on this topic with you:

Custom variables for checking and building can be set through
"~/.R/check.Renviron" and " ~/.R/build.Renviron". But not the "LANGUAGE"
variable; it will always be set to "C". I couldn't find a way to change the
locales for a check or build run; they are always set to the locales of my
system ("German" in my case). Except the collation locale ("LC_COLLATE ")
which is set to "C". That is also what the manual mentions. This should
answer the question in the title.

Therefore I assume that generally the environment variables and the locales
should be set correctly by the package developers within the test (or
vignettes) files. And that it is not possible (or at least intended) to set
a custom language/location environment for build and check runs.