Is there a Time-only R class?

后端 未结 2 375
遥遥无期
遥遥无期 2021-01-07 14:00

Is there a way to store time data in R in a class that only handles time (without dates)? I don\'t need to include dates and I feel it will take up extra memory and visualiz

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-07 14:43

    Package data.table has a new class ITime which solves this problem ideally.

    library(data.table)
    > as.ITime("12:00")-as.ITime("11:10:01")
    [1] "00:49:59"
    

提交回复
热议问题