R:通过unixtime转换为格式化日期/时间的大数据帧的直方图

时间:2023-01-21 14:57:14

I am new to R. I have a large dataframe with unix timestamps.

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

It is possible to display a histogram via the hist command which displays the unix timestamps as formatted date/time?

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

This is a snippet of the code I am currently using:

这是我目前使用的代码片段:

   hist(u12$unixtime, plot=TRUE)

With the following outcome:

具有以下结果:

R:通过unixtime转换为格式化日期/时间的大数据帧的直方图

Of course this not very user-friendly.

当然这不是非常人性化。

Solved!

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

1 个解决方案

#1


0  

Solved!

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

#1


0  

Solved!

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