Sys.getenv memperoleh nilai variabel lingkungan.
Sys.getenv(x = NULL, unset = "", names = NA)
| Parameter | Deskripsi |
|---|---|
x |
a character vector, or NULL. |
unset |
a character string. |
names |
logical: should the result be named? If NA (the default) single-element results are not named whereas multi-element results are. |
# NOT RUN {
## whether HOST is set will be shell-dependent e.g. Solaris' csh does not.
Sys.getenv(c("R_HOME", "R_PAPERSIZE", "R_PRINTCMD", "HOST"))
names(s <- Sys.getenv()) # all settings (the values could be very long)
head(s, 12)# using the Dlist print() method
## Language and Locale settings -- but rather use Sys.getlocale()
s[grep("^L(C|ANG)", names(s))]
# }