我在 R 中有这个日期:
> head(mydates)
[1] "2007-01-01" "2007-01-02" "2007-01-03" "2007-01-04" "2007-01-05" "2007-01-08"
> class(mydates)
[1] "Date"
我想把它改成这种格式
> head(targetdates)
[1] "2007-01-01 GMT" "2007-01-02 GMT" "2007-01-03 GMT" "2007-01-04 GMT"
[5] "2007-01-05 GMT" "2007-01-08 GMT"
> class(targetdates)
[1] "POSIXct" "POSIXt"
我该怎么做(在 R 中)?
谢谢