【问题标题】:R: histogram of large dataframe by unixtime converted to formatted date/timeR:按 unix 时间将大数据帧的直方图转换为格式化的日期/时间
【发布时间】:2015-01-08 10:24:06
【问题描述】:

我是 R 新手。我有一个带有 unix 时间戳的大型数据框。

是否可以通过hist 命令显示直方图,该命令将 unix 时间戳显示为格式化的日期/时间?

这是我目前使用的代码的 sn-p:

   hist(u12$unixtime, plot=TRUE)

结果如下:

当然这不是很人性化。

解决了!

hist(as.POSIXct(u12$unixtime, origin="1970-01-01"), breaks="days", plot=TRUE)

【问题讨论】:

    标签: r datetime formatting histogram unix-timestamp


    【解决方案1】:

    解决了!

    hist(as.POSIXct(u12$unixtime, origin="1970-01-01"), breaks="days", plot=TRUE)
    

    【讨论】:

      猜你喜欢
      • 2014-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-19
      • 2013-12-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多