Extract Date in R

后端 未结 3 1560
名媛妹妹
名媛妹妹 2021-01-03 07:50

I struggle mightily with dates in R and could do this pretty easily in SPSS, but I would love to stay within R for my project.

I have a date column in my data fram

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-03 08:10

    > d = as.Date("2003-10-09", format="%Y-%m-%d")
    > format(d, "%m-%d")
    [1] "10-09"
    

提交回复
热议问题