plot.daoh.barplot | R Documentation |
Plots a bar plot using ggplot2. Input to this function must be summarised, it will not count for you.
## 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] )
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]) |
A ggplot2 plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.