model_cleanly_groupwise: Fit, tidy and augment a model

Description Usage Arguments Details Value See Also

Description

Fits a modelling call to each group of a grouped data frame, extracts the fitted parameters using broom::tidy and interpolates missing values using broom::augment on existing points or the newdata.

Usage

1
model_cleanly_groupwise(x, FUN, newdata = NULL, ...)

Arguments

x

Grouped data to apply expr upon. x is passed to expr as first argument.

FUN

A name of a function that returns a model object or another R object with model information.

newdata

Data points at which to evaluate the model.

...

Arguments to expr.

Details

The fitting is wrapped with purrr::possibly and will return empty objects instead of errors.

Value

A grouped data frame with additional columns, data, model, tidy, augment_old, and augment_new.

See Also

model_display


benjbuch/summerr documentation built on July 11, 2021, 9:40 a.m.