View source: R/aest_level_and_change.R
aest_level_and_change | R Documentation |
Makes a two panel plot of the levels and changes of a non-negative variable
aest_level_and_change( df, x_var, y_var, date_format, what_change = "annual", title = NULL, scale_y = "identity", last_n = NULL, caption = NULL, caption_size = 5 )
df |
a dataframe that contains the variable of interest, a column with a time index, and the file_name column. |
x_var |
the column that contains the time index. |
y_var |
The variable to plot on y axis |
date_format |
the date format: see details. |
what_change |
either "annual" or "from_last" |
title |
Optional title to include. |
scale_y |
fed into ggplot's scale_y_continuous(trans=scale_y). E.g. "log", "sqrt". |
last_n |
Option to only use the last_n observations. |
caption |
Over-rides the default caption (variable and file) |
caption_size |
the font size for the caption, Default=5 |
Dataframe df MUST contain a column file_name, which is shown in the plot caption.
a two panel plotly object.
## Not run: if(interactive()){ #EXAMPLE1 } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.