<- function(species) {
my_pets if (species == "dog") {
return("Dude")
else if (species == "cat") {
} return(c("Pickle", "Kyle", "Nubs"))
else {
} return("Not my pet")
} }
Lecture Ticket 8
Reading
Read the following sections of IFDAR.
- Finish Chapter 5
Questions
Consider the function:
What would
my_pets(species = "dog")
return?What would
my_pets(species = "bird")
return?What would
my_pets(species = "cat")
return?