R/switch_weekday.R

Defines functions switch_weekday

switch_weekday <- function(weekday){
  switch(weekday,
         "sunday" = 1,
         "monday" = 2,
         "tuesday" = 3,
         "wednesday" = 4,
         "thursday" = 5,
         "friday" = 6,
         "saturday" = 7,
         stop("Choose a weekday.")
  )
}
Glender/DutchDayDummies documentation built on Feb. 24, 2022, 7:15 a.m.