#' time series signiture
#'
#' @description This function adds time specific arguments to your dataframe
#' @param df The name of the dataframe you want to obtain time series information from, col defines the date vector from which the time series signiture is obtained
#' @param df The name of the dataframe you want to obtain time series information from, col defines the date vector
#' @return datatframe, tibble
#' @keywords time series arguments
#' @import dplyr, lubridate, rlang
#' @export
#' @examples tidyDate(df = df, var = statusvondatum)
tidyDate <- function(df, var = statusvondatum) {
df <- df %>%
dplyr:::mutate(jahr = lubridate::year({{var}}),
quartal = lubridate::quarter({{var}}),
monat = lubridate::month({{var}}),
kalenderwoche = lubridate::week({{var}}),
tag = lubridate::day({{var}}),
wochentag = lubridate::wday({{var}}, abbr = TRUE, label = TRUE))
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.