Learn R Programming

brolgar (version 1.0.0)

key_slope: Fit linear model for each key

Description

Using key_slope you can fit a linear model to each key in the tsibble. add_key_slope adds this slope information back to the data, and returns the full dimension tsibble.

Usage

key_slope(.data, formula, ...)

add_key_slope(.data, formula)

add_key_slope.default(.data, formula)

Value

tibble with coefficient information

Arguments

.data

tsibble

formula

formula

...

extra arguments

Examples

Run this code
key_slope(heights, height_cm ~ year)

Run the code above in your browser using DataLab