I have a function that takes one argument and prints a string:
test <- function(year){
print(paste('and year in (', year,')'))
}
I input a vector with one element year(2012) it will print this:
"and year in ( 2012 )"
How do I write the function so if I put test(c(2012,2013,2014))it prints this?
"and year in ( 2012,2013,2014 )"