plotPD: Function to plot partial dependence plots with bootstrap...

View source: R/plotPD.R

plotPDR Documentation

Function to plot partial dependence plots with bootstrap uncertainties

Description

Function to plot partial dependence plots with bootstrap uncertainties

Usage

plotPD(
  dw_model,
  variable = "all",
  intervals = 40,
  ylim = NULL,
  ylab = NULL,
  col = "tomato",
  nrow = NULL,
  polar.wd = FALSE,
  auto.text = TRUE,
  plot = TRUE
)

Arguments

dw_model

Model object from running buildMod().

variable

The variable(s) to plot. Defaults to "all", which plots all variables.

intervals

Number of intervals to to calculate partial dependence over.

ylim

user-specified ylim.

ylab

y-axis label. By default this is the pollutant name.

col

Colour(s) to use for the lines/points/uncertainty ribbons. If multiple colours are provided (e.g., cols = c("tomato", "royalblue")), they will be cycled through until all variables are plotted.

nrow

Number of rows for the plots.

polar.wd

Plot the any wind direction components, labelled "wd", on a polar axis? Defaults to FALSE.

auto.text

Either TRUE (default) or FALSE. If TRUE titles and axis labels will automatically try and format pollutant names and units properly e.g. by subscripting the ‘2’ in NO2.

plot

Should a plot be produced? FALSE can be useful when analysing data to extract plot components and plotting them in other ways.

Value

Invisibly returns a list containing the plot and the data used to make the plot to allow post processing, e.g., modifying the ggplot.

Author(s)

David Carslaw

See Also

Other deweather model plotting functions: plot2Way(), plotInfluence()


davidcarslaw/deweather documentation built on March 27, 2024, 8:18 a.m.