我有一个包含毫秒数据的数据集,我使用以下代码将其转换为日期/时间:
> cl1$date <- strptime(cl1[,1], "%Y-%m-%d %H:%M:%OS")
> head(cl1$date)
[1] "2012-06-06 10:30:00.4" "2012-06-06 10:30:00.5" "2012-06-06 10:30:00.6"
[4] "2012-06-06 10:30:00.7" "2012-06-06 10:30:00.8" "2012-06-06 10:30:00.9"
...
[71935] "2012-06-27 10:59:55.28" "2012-06-27 10:59:55.38" "2012-06-27 10:59:55.48"
[71938] "2012-06-27 10:59:55.58" "2012-06-27 10:59:55.68" "2012-06-27 10:59:55.78"
但现在我想将它们从转移"2012-06-27 10:59:55.28"
到"2012-06-27 10:59:55.3"
(即毫秒只有 1 位小数)。我应该怎么做才能修改它?