View source: R/assign_to_R_env.R
assign_to_R_env | R Documentation |
Hack variable into global env (bypasses R CMD checks). This does create a new variable in the R environment but NOT a new variable in the system environment. To create a system environment variable being accessible via 'Sys.getenv(...)', use the function 'DIZtools::setenv2(key = "varname", val = 7)'. Old function name: 'global_env_hack()'
assign_to_R_env(key, val, pos = 1)
key |
A character (!) string. The name of the assigned variable |
val |
An object. The object that will be assigned to 'key'. |
pos |
An integer. The position of the environment (default: 1). |
No return value, called for side effects (see description).
http://adv-r.had.co.nz/Environments.html
utils_path <- tempdir()
assign_to_R_env(
key = "utils_path",
val = utils_path,
pos = 1L
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.