Learn R Programming

vectra (version 0.6.2)

reframe: Summarise with variable-length output per group

Description

Like summarise() but allows expressions that return more than one row per group. Currently implemented via collect() fallback.

Usage

reframe(.data, ...)

Value

A data.frame (not a lazy node).

Arguments

.data

A vectra_node object.

...

Named expressions.

Examples

Run this code
f <- tempfile(fileext = ".vtr")
write_vtr(data.frame(g = c("a", "a", "b"), x = c(1, 2, 3)), f)
tbl(f) |> group_by(g) |> reframe(range_x = range(x))
unlink(f)

Run the code above in your browser using DataLab