aggregate_tsbl_vars: Aggregate tsbl_vars by new key field

Description Usage Arguments Details Value Functions

View source: R/fct_testdata.R

Description

Use new key to aggregate tsbl_vars.

Usage

1
2
3
4
5
aggregate_tsbl_vars(tsbl_vars, by, .fun = median, ...)

industry_median(tsbl_vars)

industry_mean(tsbl_vars)

Arguments

tsbl_vars

A tsibble of time series vars.

by

A character of key field.

.fun

A function to aggregate numeric variables.

...

Arguments passed on to .fun.

Details

industry_median()/industry_mean() is a wrapper of aggregate_tsbl_vars().

Value

A tsibble aggregated by new key

Functions


chriszheng2016/zstexplorer documentation built on June 13, 2021, 9:47 a.m.