如何安全地以纳秒精度导入时间戳
How to safely import timestamps with Nanosecond precision
我今天早上发现 R 中的大部分时间戳格式似乎都是基于 posix.ct class 的,由于舍入和累积错误,使用纳秒时间戳似乎有风险.这是真的吗?
如果是这样,需要哪些包和处理步骤才能以纳秒精度安全地导入时间戳 - 可能来自 csv 文件? (最好留在 tidyverse 中的包)
当前使用的输出可视化工具有 ggplot2 、plotly 和 d3
我们为此写了一个包:nanotime
它依赖于标准 'numer of nanoseconds since epoch stored in an in int64' 表示,并封装 bit64 supplies the integer64
type. Internally package RcppCCTZ is used for some of the parsing and formatting and more. And one package that already works well with integer64
and hence our nanotime
objects is data.table。
我今天早上发现 R 中的大部分时间戳格式似乎都是基于 posix.ct class 的,由于舍入和累积错误,使用纳秒时间戳似乎有风险.这是真的吗?
如果是这样,需要哪些包和处理步骤才能以纳秒精度安全地导入时间戳 - 可能来自 csv 文件? (最好留在 tidyverse 中的包)
当前使用的输出可视化工具有 ggplot2 、plotly 和 d3
我们为此写了一个包:nanotime
它依赖于标准 'numer of nanoseconds since epoch stored in an in int64' 表示,并封装 bit64 supplies the integer64
type. Internally package RcppCCTZ is used for some of the parsing and formatting and more. And one package that already works well with integer64
and hence our nanotime
objects is data.table。