accessors {bregr}R Documentation

Accessor functions for breg objects

Description

[Stable]

These functions provide access to components of breg objects, serving as counterparts to the ⁠br_set_*()⁠ functions. Some functions include additional arguments for extended functionality.

Usage

br_get_data(obj)

br_get_y(obj)

br_get_x(obj)

br_get_n_x(obj)

br_get_x2(obj)

br_get_n_x2(obj)

br_get_group_by(obj)

br_get_config(obj)

br_get_models(obj)

br_get_model(obj, idx)

br_get_results(obj, tidy = FALSE, ...)

Arguments

obj

A breg object.

idx

Index or names (focal variables) of the model(s) to return.

tidy

If TRUE return tidy (compact) results, otherwise return comprehensive results. The tidy results are obtained from broom::tidy() while comprehensive results are obtained from broom.helpers::tidy_plus_plus(). The results can be configured when run with br_run().

...

Subset operations passing to dplyr::filter() to filter results.

Value

Output depends on the function called:

See Also

pipeline for building breg objects.

Examples

m <- br_pipeline(mtcars,
  y = "mpg",
  x = colnames(mtcars)[2:4],
  x2 = "vs",
  method = "gaussian"
)
br_get_data(m)
br_get_y(m)
br_get_x(m)
br_get_n_x(m)
br_get_x2(m)
br_get_n_x2(m)
br_get_group_by(m)
br_get_config(m)
br_get_models(m)
br_get_model(m, 1)
br_get_n_x2(m)
br_get_results(m)
br_get_results(m, tidy = TRUE)
br_get_results(m, tidy = TRUE, term == "cyl")


[Package bregr version 1.0.0 Index]