plotZScores: Plot z-scores from a set of model runs

View source: R/plotZScores.R

plotZScoresR Documentation

Plot z-scores from a set of model runs

Description

Function to plot z-scores from a set of model runs.

Usage

plotZScores(
  dfr,
  x = "y",
  y = "zscore",
  color = NULL,
  shape = NULL,
  size = 2,
  position = "identity",
  dodge = 0.2,
  facets = NULL,
  facet.scales = "fixed",
  xlab = "year",
  ylab = NULL,
  title = NULL,
  legend = NULL,
  xlims = NULL,
  ylims = NULL,
  alpha = 1,
  plotPoints = TRUE,
  colour_scale = ggplot2::scale_colour_hue(),
  fill_scale = ggplot2::scale_fill_hue(),
  showSmooths = TRUE,
  showPlot = FALSE
)

Arguments

dfr
  • dataframe

x
  • column name for x axis (default = 'year')

y
  • column name for y axis (default='z-score')

color
  • column name for color levels (or NULL)

shape
  • column name for shape levels (or NULL)

size
  • size for shapes

position
  • indicates ggplot2 position_ to use ('dodge','jitter','identity',)

dodge
  • value to position dodge

facets
  • string giving faceting formula for facet_grid

facet.scales
  • ggplot2 scales option for facet_grid

xlab
  • label for x axis

ylab
  • label for y axis

title
  • title for plot

legend
  • legend title

xlims
  • limits for x axis

ylims
  • limits for y axis

alpha
  • transparency value to use

plotPoints
  • flag to include points on plots

colour_scale
  • ggplot2 scale_colour object (default is ggplot2::scale_colour_hue())

fill_scale
  • ggplot2 scale_fill object (default is ggplot2::scale_fill_hue())

showSmooths
  • flag (T/F) to show smooth fits to z-scores

showPlot
  • flag (T/F) to show plot immediately

Details

Smooth fits are grouped by 'color'.

Value

ggplot2 object


wStockhausen/rCompTCMs documentation built on Sept. 12, 2023, 3:13 p.m.