You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to complete the Functions lesson for Rprogramming and although my mad_libs function code was accepted as "correct" by swirl and I'm able to move on, the print out only ever has blanks for the arguments. Below is my code and print out
However, I'm having trouble understanding why we are using a '...' here, since there are only 3 arguments/variables anyway. Any clarity would really be appreciated!
I'm trying to complete the Functions lesson for Rprogramming and although my mad_libs function code was accepted as "correct" by swirl and I'm able to move on, the print out only ever has blanks for the arguments. Below is my code and print out
mad_libs <- function(...){
Do your argument unpacking here!
args <- list(...)
place <- args[["place"]]
adjective <- args[["adjective"]]
noun <- args[["noun"]]
Don't modify any code below this comment.
Notice the variables you'll need to create in order for the code below to
be functional!
paste("News from", place, "today where", adjective, "students took to the streets in protest of the new", noun, "being installed on campus.")
}
The text was updated successfully, but these errors were encountered: