plot_lms: Plots multiple scatterplots with linear regression line

Description Usage Arguments Value Author(s) See Also Examples

Description

This function will take multiple column names and plot scatterplots against "Resting Heart Rate". Then it fits a linear regression and adds that line. It also says at the bottom what the p-value for the slope coefficient is.

Usage

1
plot_lms(dataset, col_names, response_variable, multivariate = FALSE, ...)

Arguments

dataset

This should just be a dataset with a column name "Resting Heart Rate"

col_names

This specifies with columns to plot and do the linear regression.

response_variable

A character string of the column name of the response variable

multivariate

This is should either be true or false. This determines if plot_lms fits a multivariate regression or it fits a linear regression to each of the columns selected.

...

This will pass to the abline function. Therefore, it will control things like color of that line. It doesn't currently do anything to the plotting of the points.

Value

It will return as many plots as the length of the col_names vector. It shows the regression line fit (whether single or multivariate regression). It also puts the function at the top of the figure.

Author(s)

Corey Kimzey

See Also

plot_cor,

Examples

1
2
data(tester)
plot_lms(tester, col_names  = c("Inf", "Computing"), response_variable = "Resting Heart Rate")

coreykimzey/heartrate documentation built on May 28, 2019, 7:47 p.m.