keep | R Documentation |
keep
saves an object to a new object. This is useful
if one wants to save an intermediate result when using pipes.
keep(object, name, pos = 1, envir = as.environment(pos), inherits = FALSE)
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 |
Upon saving object
to name
, the value of object
is
returned. This makes it suitable for pipes.
Mathijs Deen
mtcars |>
lm(mpg ~ disp + hp, data = _) |>
keep(lm.mpg_disp_hp) |>
summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.