generated from CorrelAid/r-bare-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66dffcd
commit 4b2a011
Showing
9 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
.onLoad <- function(libname, pkgname) { | ||
|
||
# Set the functions whose results are to be cached | ||
gen_genesis_api <<- memoise::memoise(gen_genesis_api) | ||
gen_zensus_api <<- memoise::memoise(gen_zensus_api) | ||
gen_regio_api <<- memoise::memoise(gen_regio_api) | ||
|
||
if (!nzchar(Sys.getenv("GENESIS_LANG"))) Sys.setenv(GENESIS_LANG = "en") | ||
# Set the default language of the package | ||
if (!nzchar(Sys.getenv("RESTATIS_LANG"))) Sys.setenv(GENESIS_LANG = "en") | ||
|
||
# Set the default URL for the GENESIS database | ||
if (!nzchar(Sys.getenv("RESTATIS_GENESIS_URL"))) { | ||
|
||
Sys.setenv(RESTATIS_GENESIS_URL = "https://www-genesis.destatis.de/genesisWS/rest/2020") | ||
|
||
} | ||
|
||
# Set the default URL for the www.regionalstatistik.de database | ||
if (!nzchar(Sys.getenv("RESTATIS_REGIO_URL"))) { | ||
|
||
Sys.setenv(RESTATIS_REGIO_URL = "https://www.regionalstatistik.de/genesisws/rest/2020/") | ||
|
||
} | ||
|
||
# Set the default URL for the ZENSUS 2022 database | ||
if (!nzchar(Sys.getenv("RESTATIS_ZENSUS_URL"))) { | ||
|
||
Sys.setenv(RESTATIS_ZENSUS_URL = "https://ergebnisse.zensus2022.de/api/rest/2020") | ||
|
||
} | ||
|
||
} |