add_empty_model: Plot the empty model

View source: R/gf_model_old.R

add_empty_modelR Documentation

Plot the empty model

Description

The empty model is extracted by pulling out b0() from the passed model. This expression is passed to gf_hline() to plot the empty model. If this plot is not being chained to a prior plot, a blank point plot is created to make sure the y-axis is informative and has the range of the original data.

Usage

add_empty_model(object, model, ...)

Arguments

object

A gg object to chain to, optionally.

model

An empty model fit by lm().

...

Additional arguments to pass to gf_hline().

Value

A gg object.


UCLATALL/coursekata-r documentation built on Aug. 24, 2023, 8:54 p.m.