Description Usage Arguments Details Value Author(s) Examples
View source: R/ts_median_excess_plt.R
Plot out the excess +/- of the median value grouped by certain time parameters
1 2 3 4 5 6 7 8 | ts_median_excess_plt(
.data,
.date_col,
.value_col,
.x_axis,
.ggplot_group_var,
.years_back
)
|
.data |
The data that is being analyzed, data must be a tibble/data.frame |
.date_col |
The column of the tibble that holds the date |
.value_col |
The column that holds the value of interest |
.x_axis |
What is the be the x-axis, day, week, etc. |
.ggplot_group_var |
The variable to group the ggplot on |
.years_back |
How many yeas back do you want to go in order to compute the median value |
Supply data that you want to view and you will see the excess +/- of the median values over a specified time series tibble
A ggplot2 plot
Steven P Sanderson II, MPH
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(timetk)
library(dplyr)
library(lubridate)
ts_ymwdh_tbl(
.data = m4_daily
, .date_col = date
) %>%
ts_median_excess_plt(
.date_col = date
, .value_col = value
, .x_axis = wk
, .ggplot_group_var = yr
, .years_back = 5
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.