Skip to contents

Modify atom data in a grab tree

Usage

grab_modify_data(grab, fn, .recursive = TRUE)

Arguments

grab

A grab_atom or grab_bag.

fn

A function from data.frame to data.frame.

.recursive

Logical. If TRUE and grab is a bag, apply to all atoms.

Value

A transformed grab object.

Examples

g <- grab_atom("point", dfr(x = c(0.2, 0.8), y = c(0.3, 0.7), size = c(4, 9)))
#> Error in grab_atom("point", dfr(x = c(0.2, 0.8), y = c(0.3, 0.7), size = c(4,     9))): could not find function "grab_atom"
grab_modify_data(g, function(d) d[d$size < 8, , drop = FALSE])
#> Error in grab_modify_data(g, function(d) d[d$size < 8, , drop = FALSE]): could not find function "grab_modify_data"