【问题标题】:Excel Date-Timestamp getting Changed when importing to R. how to change it to timestamp in R?导入到 R 时 Excel 日期时间戳发生更改。如何将其更改为 R 中的时间戳?
【发布时间】:2021-02-24 11:44:55
【问题描述】:

Excel 中的日期列

       Date
2021-02-19 10:05:03
2021-02-19 09:47:19
2021-02-19 10:53:19

R中的日期列导入

     Date
44245.5487615741 
44245.6650578704 
4246.42021990744

如何在时间戳中更改此日期

【问题讨论】:

    标签: r timestamp


    【解决方案1】:

    首先,最好了解您如何加载数据。 要将 Excel 数字转换为日期,这可能会对您有所帮助How to convert Excel date format to proper date in R

    如果您使用openxlsx::read.xlsx(),您可能希望使用detectDates 参数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-31
      相关资源
      最近更新 更多