plot.daoh.barplot: Plot DAOH barplot.

View source: R/plot.R

plot.daoh.barplotR Documentation

Plot DAOH barplot.

Description

Plots a bar plot using ggplot2. Input to this function must be summarised, it will not count for you.

Usage

## S3 method for class 'daoh.barplot'
plot(
  input.summary.dt,
  daoh.col.name = "daoh",
  by.group = NULL,
  xlimits = c(-0.5, 90.5),
  y.aes = c("prop", "N")[1]
)

Arguments

input.summary.dt

A data.table with DAOH summarised by value (and by some other group if desired).

daoh.col.name

Name of the DAOH column

by.group

Name of the stratifying group column, none if NULL (e.g., an intervention) (Default: NULL)

xlimits

Limits on the x-axis of the plot (Default: c(-0.5, 90.5))

y.aes

What's on the y-axis. "prop" for proportion per group, "N" for frequency. (Default: c('prop', "N")[1])

Value

A ggplot2 plot.


mattmoo/daohtools documentation built on Feb. 5, 2023, 5:38 a.m.