我想在DT
数据表中看到毫秒:
options(digits.secs=6)
library(data.table)
d = data.table(x = 1:10,time = as.POSIXct('2015-03-23 12:00:00.123'))
library(DT)
datatable(d)
答案 0 :(得分:1)
options(digits.secs=6)
library(data.table)
d = data.table(x = 1:10,time = as.POSIXct('2015-03-23 12:00:00.123'))
d$time = strftime(d$time,'%Y-%m-%d %H:%M:%OS3')
View(d)
library(DT)
datatable(d)
给出:
Show entries
Search:
x time
1 1 2015-03-23 12:00:00.122
2 2 2015-03-23 12:00:00.122
3 3 2015-03-23 12:00:00.122
4 4 2015-03-23 12:00:00.122