Created
December 24, 2021 03:29
-
-
Save terashim/304c7e30b981849af04da8f5c88e1e8d to your computer and use it in GitHub Desktop.
R Sys.setenv の副作用を検証
This file contains hidden or 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
# Sys.setenv の副作用を検証 | |
local({ | |
x <- 1 | |
Sys.setenv(MYENVVAR = x) | |
}) | |
x | |
#> error | |
# 変数はローカル | |
Sys.getenv("MYENVVAR") | |
#> [1] "1" | |
# 環境変数はグローバル |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment