Learn R Programming

tsibble (version 0.4.0)

nest.tbl_ts: Nest repeated values in a list-variable.

Description

Nest repeated values in a list-variable.

Usage

# S3 method for tbl_ts
nest(data, ..., .key = "data")

Arguments

data

A tbl_ts.

...

A selection of columns. If empty, all variables are selected. You can supply bare variable names, select all variables between x and z with x:z, exclude y with -y. For more options, see the dplyr::select() documentation. See also the section on selection rules below.

.key

The name of the new column, as a string or symbol.

This argument is passed by expression and supports quasiquotation (you can unquote strings and symbols). The name is captured from the expression with rlang::quo_name() (note that this kind of interface where symbols do not represent actual objects is now discouraged in the tidyverse; we support it here for backward compatibility).

Value

A tibble containing a list column of tbl_ts.

See Also

tidyr::nest, unnest.lst_ts for the inverse operation.

Examples

Run this code
# NOT RUN {
pedestrian %>% 
  nest(-Sensor)
pedestrian %>% 
  group_by(Sensor) %>% 
  nest()
# }

Run the code above in your browser using DataLab