plot_all: Plot all given plots in a square matrix form.

Description Usage Arguments Value Examples

Description

Plot all given plots in a square matrix form.

Usage

1
plot_all(plots, ncol = NA, max.per.page = NA)

Arguments

plots

a list of plots

ncol

numeric; the number of column that the arranged grid need to be. defaults to fitting all plots in square matrix

max.per.page

numeric; maximum number of plots allowed in one page.

Value

plots in a given list arrangeed using gridExtra

Examples

1
2
3
4
5
6
7
8
9
         library(MASS)
         data(Cars93)
         # a regression with categorical variable
         cars_lm <- lm(Price ~ Passengers + Length + RPM + Origin, data = Cars93)
         plots <- gg_diagnose(cars_lm, plot.all = FALSE)
         names(plots)
         selected.plots <- plots[-c(2, 5)]
         plot_all(selected.plots)
         

Example output

 [1] "residual_hist" "Passengers"    "Length"        "RPM"          
 [5] "Origin"        "res_fitted"    "qqplot"        "scalelocation"
 [9] "resleverage"   "cooksd"       
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

lindia documentation built on May 2, 2019, 7:23 a.m.