File: Sys.getenv_value.Rd

package info (click to toggle)
r-cran-pkgmaker 0.32.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,192 kB
  • sloc: sh: 13; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/packages.R
\name{Sys.getenv_value}
\alias{Sys.getenv_value}
\title{System Environment Variables}
\usage{
Sys.getenv_value(name, raw = FALSE)
}
\arguments{
\item{name}{variable name as a character string.}

\item{raw}{logical that indicates if one should return the raw value or
the convertion of any false value to \code{FALSE}.}
}
\value{
the value of the environment variable as a character string or
\code{NA} is the variable is not defined \strong{at all}.
}
\description{
System Environment Variables
}
\examples{

# undefined returns FALSE
Sys.getenv_value('TOTO')
# raw undefined returns NA
Sys.getenv_value('TOTO', raw = TRUE)

Sys.setenv(TOTO='bla')
Sys.getenv_value('TOTO')

# anything false-like returns FALSE
Sys.setenv(TOTO='false'); Sys.getenv_value('TOTO')
Sys.setenv(TOTO='0'); Sys.getenv_value('TOTO')

# cleanup
Sys.unsetenv('TOTO')

}