add_group_model: Plot the group model

View source: R/gf_model_old.R

add_group_modelR Documentation

Plot the group model

Description

The group model is represented by mean lines for each group in the model. The values for these lines are extracted using the formula with the passed data, and then plotted via gf_segment(). If this plot is not being chained to a prior plot, a blank point plot is created to make sure the axes are informative and have the range of the original data.

Usage

add_group_model(object, gformula, data, width = 0.3, ...)

Arguments

object

A gg object to chain to, optionally.

gformula

A formula of the shape y ~ x.

data

The data the formula refers to.

width

The width of the mean lines to be plotted.

...

Additional arguments passed to gf_segment()

Value

A gg object.


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