keep {MDMA} | R Documentation |
Save something to an object
Description
keep
saves an object to a new object. This is useful
if one wants to save an intermediate result when using pipes.
Usage
keep(object, name, pos = 1, envir = as.environment(pos), inherits = FALSE)
Arguments
object |
the object that is to be saved into |
name |
the name of the new object, containing the value of |
pos |
where to do the assignment. See |
envir |
the environment to use. See |
inherits |
should the enclosing framss of the environment be inspected?
See |
Value
Upon saving object
to name
, the value of object
is
returned. This makes it suitable for pipes.
Author(s)
Mathijs Deen
Examples
mtcars |>
lm(mpg ~ disp + hp, data = _) |>
keep(lm.mpg_disp_hp) |>
summary()
[Package MDMA version 1.1.0 Index]