Set English, if needed, as default language for R

This commit is contained in:
2022-05-12 12:10:13 +02:00
parent 29d17a4072
commit 9b78c1a73e
2 changed files with 15 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
library(glue)
Sys.setenv(LANG = "en")
resoutput <- capture.output(Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8'))
if (Sys.getlocale("LC_MESSAGES") == "es_ES.UTF-8") {
resoutput <- capture.output(Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8'))
}
args = commandArgs(trailingOnly=TRUE)
if (length(args)!=3) {
stop("Only two arguments must be supplied (score & input_file & visualize).n", call.=FALSE)