I'm still confused by all the embrace, enquo, unquo, !! etc.
I want to create a different tibble based on the day of the week.
library(tidyverse)
library(lubridate)
Monday <- c("Bob", "Jim", "Jane")
Tuesday <- c("Roberto", "Maria", "Xochil")
# Assume today is Monday
expected <- tibble(staff = Monday)
days <- function(dow){
tibble(staff = !!dow). # I don't know how to wrap dow
}
dayofweek <- wday(today(), label = TRUE, abbr = FALSE)
days(dayofweek)
There should be some way to wrap 'dow' in the function so that it takes the dayofweek and when it is Monday, creates a tibble based on the Monday list.