I'm a beginner in R and totally lost with my homework. I suppose to create a function that takes a character string as input and returns a vector of the days of the week. The days will not return match with incorrect spelling and partial days. The days should also be in order, Monday should come before Tuesday, etc.
Sample input:
days.present(mystr = "Dinner on Monday, tuesday, Wed, or Tursday?")
days.present("SundayMonday")
days.present("Are we meeting today?")
The output should be like this:
[1] "Monday" "Tuesday"
[1] "Sunday" "Monday"
character(0)