• R语言
  • splus 求助,怎么用splus 转化日期的格式?

怎么用splus 转化日期的格式?

比如说开始是2008-2-9要转化成2/9/2008

该怎么转?
R:

x <- as.Date("2008-07-22")

format(x, "%m/%d/%Y")