marginal_plot: Create "margin plots"

View source: R/marginal_plot.R

marginal_plotR Documentation

Create "margin plots"

Description

This function takes as an argument a regular flexplot graphic that has panels, then plots the "marginal" relationships for the panels. This makes it easier to see the average effect across the rows (or columns).

Usage

marginal_plot(p, columns = TRUE, rows = TRUE, grand_mean = TRUE)

Arguments

p

A flexplot graphic that has paneled variables.

columns

Logical. Should column panels be plotted?

rows

Logical. Should row panels be plotted?

grand_mean

Logical. Stating TRUE will generate a simple bivariate plot between X and Y

Value

A graphic with marginal plots

Examples

p = flexplot(weight.loss~motivation | gender + rewards, data=exercise_data)
marginal_plot(p)
marginal_plot(p, rows=FALSE)

dustinfife/flexplot documentation built on Sept. 23, 2024, 9:01 p.m.