From a2674571c469cda1260d509169923fb4e40c5c45 Mon Sep 17 00:00:00 2001 From: buhly Date: Fri, 6 Dec 2024 16:55:47 +0100 Subject: [PATCH] fix auto language settings --- R/gen_cube.R | 2 +- R/gen_jobs.R | 2 +- R/gen_table.R | 2 +- R/zzz.R | 2 +- man/gen_download_job.Rd | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/gen_cube.R b/R/gen_cube.R index d37d174..e90ee5f 100644 --- a/R/gen_cube.R +++ b/R/gen_cube.R @@ -72,7 +72,7 @@ gen_cube_ <- function(name, classifyingvariable3 = NULL, classifyingkey3 = NULL, stand = NULL, - language = Sys.getenv("GENESIS_LANG")) { + language = Sys.getenv("RESTATIS_LANG")) { area <- match.arg(area) database <- match.arg(database) diff --git a/R/gen_jobs.R b/R/gen_jobs.R index 2c6454b..cd50195 100644 --- a/R/gen_jobs.R +++ b/R/gen_jobs.R @@ -133,7 +133,7 @@ gen_download_job <- function(name, database = c("genesis", "regio"), area = c("all", "public", "user"), compress = FALSE, - language = Sys.getenv("GENESIS_LANG"), + language = Sys.getenv("RESTATIS_LANG"), all_character = TRUE) { #----------------------------------------------------------------------------- diff --git a/R/gen_table.R b/R/gen_table.R index 6fb243b..882bc53 100644 --- a/R/gen_table.R +++ b/R/gen_table.R @@ -73,7 +73,7 @@ gen_table_ <- function(name, classifyingvariable3 = NULL, classifyingkey3 = NULL, stand = NULL, - language = Sys.getenv("GENESIS_LANG"), + language = Sys.getenv("RESTATIS_LANG"), job = FALSE, all_character = TRUE) { diff --git a/R/zzz.R b/R/zzz.R index 10b28c0..d9e19a1 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -6,7 +6,7 @@ gen_regio_api <<- memoise::memoise(gen_regio_api) # Set the default language of the package - if (!nzchar(Sys.getenv("GENESIS_LANG"))) Sys.setenv(RESTATIS_LANG = "en") + if (!nzchar(Sys.getenv("RESTATIS_LANG"))) Sys.setenv(RESTATIS_LANG = "en") # Set the default URL for the GENESIS database if (!nzchar(Sys.getenv("RESTATIS_GENESIS_URL"))) { diff --git a/man/gen_download_job.Rd b/man/gen_download_job.Rd index b41f715..44211fd 100644 --- a/man/gen_download_job.Rd +++ b/man/gen_download_job.Rd @@ -9,7 +9,7 @@ gen_download_job( database = c("genesis", "regio"), area = c("all", "public", "user"), compress = FALSE, - language = Sys.getenv("GENESIS_LANG"), + language = Sys.getenv("RESTATIS_LANG"), all_character = TRUE ) } @@ -22,7 +22,7 @@ gen_download_job( \item{compress}{Boolean. Should empty rows and columns be discarded? Default is FALSE.} -\item{language}{Character string. Defines if the decimal mark and grouping mark of integers should be represented based on the European (e.g.: '100,5', '200.000,5') or American ('100.5', '200,000.5') system. Defaults to 'Sys.getenv("GENESIS_LANG")'.} +\item{language}{Character string. Defines if the decimal mark and grouping mark of integers should be represented based on the European (e.g.: '100,5', '200.000,5') or American ('100.5', '200,000.5') system. Defaults to 'Sys.getenv("RESTATIS_LANG")'.} \item{all_character}{Boolean. Should all variables be imported as 'character' variables? Avoids fuzzy data type conversions if there are leading zeros or other special characters. Defaults to TRUE.} }