【发布时间】:2018-04-01 19:23:14
【问题描述】:
在 R 中获取自 Epoch 时间以来的天数、月数和周数的最佳方法是什么?
(Java 存在解决方案:Get the number of days, weeks, and months, since Epoch in Java)
我知道从纪元中获取秒数,但是如何获取周数?
as.integer( Sys.time()) #.... gives number of seconds since epoch time
【问题讨论】:
-
我认为最好的方法是获取
interval -
能否给个示例代码。