mfs_scatter_from_multimodel: A Lined Scatterplot Function

Description Usage Arguments Examples

View source: R/mfs_scatter_from_multimodel.R

Description

This function uses ggplot2 to create a scatterplot with a line of best fit and a loess smoother overlaid, based on an existing linear model.

Usage

1
2
mfs_scatter_from_multimodel(model, xlab = "__", ylab = "__", title = "__",
  color_scheme = "blackish")

Arguments

model

A linear model, returned from glm()

xlab

Optionally, provide a label for the x axis

ylab

Optionally, provide a label for the y axis

title

Optionally, provide a title to override the default

color_scheme

Optionally, a color scheme for the plot, "blackish" "bluish" "reddish" "greenish"

Examples

1
2
3
mfs_scatter_from_model(glm(y~x,data=z))
mfs_scatter_from_model(glm(y~x,data=z), title="A great plot")
mfs_scatter_from_model(glm(y~x,data=z), xlab="Independent variable")

mfschmidt/mfs.r.utils documentation built on Nov. 23, 2017, 9:48 p.m.