tidyme: Extended tidy cleaning of selected objects using S3 method

Description Usage Arguments Value Author(s) See Also Examples

View source: R/tidyme.R

Description

S3 method for extended tidying of selected model outputs. The default method relies on broom::tidy to return a tidied object

Usage

1
2
3
4
5
6
7
tidyme(x, ...)

## Default S3 method:
tidyme(x, ...)

## S3 method for class 'survfit'
tidyme(x, ...)

Arguments

x

S3 object

...

other arguments passed on to the method

Value

Tibble containing all list elements of the S3 object as columns

Author(s)

Steven Haesendonckx

See Also

tidy

Examples

1
2
3
4
5
6
7
8
## Extended tidying for a survfit object
surv_object <- survival::survfit(data = adtte, Surv(AVAL, 1-CNSR) ~ TRTP)
tidied <- tidyme(surv_object)

## Tidyme for non-included classes
data <- cars
lm_object <- lm(data = cars, speed ~ dist)
lm_tidied <- tidyme(lm_object)

visR-sandbox/visR-survival documentation built on Sept. 18, 2020, 6:21 p.m.