plotMDFR.XY: Plot melted dataframe using an xy-plot format.

View source: R/plotMDFR.XY.R

plotMDFR.XYR Documentation

Plot melted dataframe using an xy-plot format.

Description

Function to plot a melted dataframe using an xy plot format.

Usage

plotMDFR.XY(
  mdfr,
  x = NULL,
  value.var = "val",
  agg.formula = NULL,
  agg.function = wtsUtilities::Sum,
  colour = NULL,
  fill = NULL,
  linetype = NULL,
  shape = NULL,
  facet_grid = NULL,
  facet_wrap = NULL,
  nrow = NULL,
  ncol = NULL,
  dir = "h",
  scales = "fixed",
  xlim = NULL,
  ylim = NULL,
  xlab = "",
  ylab = "",
  units = "",
  lnscale = FALSE,
  title = "",
  guideTitleColour = NULL,
  guideTitleFill = NULL,
  guideTitleLineType = NULL,
  guideTitleShape = NULL,
  plotPoints = TRUE,
  points = list(alpha = 1, size = 1, dodge = 0),
  plotLines = TRUE,
  plotABline = FALSE,
  abline = list(intercept = 0, slope = 1, colour = "black", linetype = 3, size = 1, alpha
    = 0.8),
  plotViolins = FALSE,
  violins = list(scale = "count", stat = "ydensity", dodge = 0, alpha = 1),
  ggtheme = ggplot2::theme_gray(),
  showPlot = FALSE
)

Arguments

mdfr

- melted dataframe

x

- column name for x-axis values

value.var

- column name for values to aggregate (value.var in cast)/plot on y-axis

agg.formula

- aggregation formula (left-hand side of cast formula)

agg.function

- aggregation function (fun.aggregate in cast, default=wtsUtilities::Sum)

colour

- column name to which colour aesthetic is mapped

fill

- column nameto which fill aesthetic is mapped

linetype

- column name to which linetype aesthetic is mapped

shape

- column name to which shape aesthetic is mapped

facet_grid

- faceting formula for facet_grid'ing

facet_wrap

- faceting formula for facet_wrap'ing

nrow

- number of rows when using facet_wrap

ncol

- number of columns when using facet_wrap

dir

- fastest direction ('h','v') for faceting

scales

- scaling flag when faceting

xlim

- x axis limits

ylim

- y axis limits

xlab

- x axis label

ylab

- y axis label

units

- combined with y axis label

lnscale

- flag to plot on ln-scale

title

- plot title

guideTitleColour

- title for colour guide

guideTitleFill

- title for fill guide

guideTitleLineType

- title for linetype guide

guideTitleShape

- title for shape guide

plotPoints

- flag to plot points

points

- list with elements alpha=1.0,size=1.0,dodge=0.0

plotLines

- flag to plot lines

plotABline

- flag to plot a straight line

abline

- list w/ components intercept, slope, colour, size, linetype, alpha describing line to plots

plotViolins

- flag to plot violins

violins

- list with elements scale="count",stat="ydensity",dodge=0.0,alpha=1.0 (see ggplot2::geom_violin for details)

ggtheme

- ggplot2 theme for plot (default=ggplot2::theme_gray())

showPlot

- flag to show plot immediately

Details

uses reshape2 package.

Value

ggplot2 object


wStockhausen/wtsPlots documentation built on July 19, 2023, 8:15 p.m.