View source: R/plot_month_bar.R
plot_month_bar | R Documentation |
Plots the output of parse_year_comp()
as a bar chart of the difference of two periods
plot_month_bar( df, current = "2020", previous = "2015 - 2019", by_code = T, vline_pos = NULL, xlim = c(0, 12), na.rm = F, type = c("difference", "percent", "absolute")[1], combine_spc = F, highlight_range = xlim, show_err = T )
df |
output of |
current |
name of group in column "y" to be subtracted from. default 2020 |
previous |
name of group in column "y" to subtract from current, default "2015 - 2019" |
by_code |
logical, should the analysis be grouped by the code column |
vline_pos |
numeric vector to place vertical lines |
na.rm |
logical, should the data be filtered by |
type |
one of "difference", "percent" or "absolute".
|
combine_spc |
logical, should species be used in facet wrapping |
highlight_range |
numerical vector length 2. range of values to highlight. bars that fall outside of this range have their alpha reduced. default equal to xlim |
show_err |
logical, show the standard error in the average on each bar. currently only avaliable when combine_spc = F |
W. S. Drysdale and J. Davison
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.