massregplot: Mass Regression Plot

Description Usage Arguments Value Examples

View source: R/massregplot.R


This function takes in a dataframe, the dependent variable, and optionally a character vector of independent variables you want the function to ignore, and produces a regression plot of every variable compared to the dependent variable passed into the function. It will ignore columns which contain characters and (also optional) factors.


massregplot(data, dv.var, ignore = NULL, save = NULL,
  include.factors = FALSE, = TRUE)



data.frame object that contains both the dependent variable and predictor variables you want to plot.


single dependent variable you want to plot your predictors against.


accepts a character vector of one or more variables you want the function to skip. If nothing is passed through this option, the function will attempt to create a graph plotting the dependent variable and every other column of data.


accepts a character. If the function recieves a character, it will create a pdf file with that name and leave the plots in there.


if TRUE, will also plot factor variables against your dv. Otherwise it will skip these as regression plots of categorical variables are of imited use.

if left TRUE, will shade the area around the regression line with the 95% confidence interval range. Setting to FALSE will plot only the regression line to a scatter plot for each paring of variables.


Doesn't return a value, per se, but will generate side effects like plotting all the graphs created by the function. If the save option is used, it will save all generated graphs to a pdf file whose name is specified by the user.


exam.df <- iris
massregplot(exam.df, "Sepal.Length", ignore = "Species")
massregplot(exam.df, "Sepal.Length", ignore = c("Species", "Petal.Width"), = FALSE)

exploreR documentation built on May 29, 2017, 12:27 p.m.

Search within the exploreR package
Search all R packages, documentation and source code