assign_in_global | R Documentation |
Assign a Value to a Name
assign_in_global(value, x, print = FALSE, envir = .GlobalEnv, ...)
value |
a value to be assigned to |
x |
a variable name, given as a character string. No coercion is done, and the first element of a character vector of length greater than one will be used, with a warning. |
print |
logical whether to also print |
envir |
the |
... |
additional arguments passed to assign |
value object (invisibly)
assign
## print and assign copy of mtcars
mtcars %>%
print() %>%
assign_in_global("mtcars2")
## same as above but using print argument
mtcars %>% assign_in_global("mtcars2", TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.