View source: R/plot_week_bar.R
| plot_week_bar | R Documentation |
Plots the output of parse_year_comp() as a bar chart of the difference of two periods
plot_week_bar(
df,
current = "2020",
previous = "2015 - 2019",
by_code = T,
vline_pos = NULL,
xlim = c(0, 52),
na.rm = F,
type = c("difference", "percent", "absolute")[1],
combine_spc = F,
highlight_range = xlim
)
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 |
W. S. Drysdale
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.