day <- "Wed" result <- switch(day, Mon = "Start of the week", Wed = "Midweek", Fri = "Almost the weekend", "Just another day" ) print(result)
Click Run to execute this code.