> mydate <- function(type){ + switch(type, + long = format(Sys.time(),"%A %B %d %Y"), + short = format(Sys.time(),"%m-%d-%y"), + cat(type,"is not recognized type\n") + ) + }
> mydate <- function(type){ + switch(type, + long = format(Sys.time(),"%A %B %d %Y"), + short = format(Sys.time(),"%m-%d-%y"), + cat(type,"is not recognized type\n") + ) + }