> 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") + ) + }
你好,我是AI助理
可以解答问题、推荐解决方案等