accessors {bregr} | R Documentation |
Accessor functions for breg
objects
Description
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 |
idx |
Index or names (focal variables) of the model(s) to return. |
tidy |
If |
... |
Subset operations passing to |
Value
Output depends on the function called:
-
br_get_data()
returns adata.frame
. -
br_get_y()
,br_get_x()
,br_get_x2()
return modeling terms. -
br_get_n_x()
andbr_get_n_x2()
return the length of termsx
andx2
. -
br_get_group_by()
returns variable(s) for group analysis. -
br_get_config()
returns modeling method and extra arguments. -
br_get_models()
returns all constructed models. -
br_get_model()
returns a subset of constructed models. -
br_get_results()
returns modeling resultdata.frame
.
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")