为什么这样做(使用列名):
> dataset$time <- dmy_hms(dataset$Timestamp)
但不是这个(使用列索引):
> dataset$time <- dmy_hms(dataset[,1])
Warning message:
All formats failed to parse. No formats found.
以下是数据中的第一列:
> dataset[,1]
# A tibble: 228 x 1
Timestamp
<chr>
1 01/01/1970 00:00:30
2 01/01/1970 00:01:00
3 01/01/1970 00:01:30
4 01/01/1970 00:02:00
5 01/01/1970 00:02:30
6 01/01/1970 00:03:00
7 01/01/1970 00:03:30
8 01/01/1970 00:04:00
9 01/01/1970 00:04:30
10 01/01/1970 00:05:00
# ... with 218 more rows
是什么给出了?