This is a convenience wrapper around
allows users to input both numeric and character week start values
set_week_start(x = 1L) get_week_start(w = NULL)
a character or integer specifying the day of the week for conversion between dates and weeks.
set_week_start, the old value of
week_start is returned,
get_week_start, the current value of
change_week_start() for changing the week_start attribute of an
# get the current definition of the week start get_week_start() # defaults to Monday (1) getOption("aweek.week_start", 1L) # identical to above # set the week start mon <- set_week_start("Sunday") # set week start to Sunday (7) get_week_start() print(set_week_start(mon)) # reset the default get_week_start() # Get the week_start of a specific aweek object. w <- date2week("2019-05-04", week_start = "Sunday") get_week_start(w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.