用羽毛书写和阅读后,带有日期列的Tibble与自身不同

时间:2017-08-21 15:23:32

标签: r feather

让我们考虑一下

x <- tibble::tibble(start_date = lubridate::ymd(NA, NA, "2016-01-01", "2018-04-01", NA))

显然它与自己相同

testthat::expect_identical(x, x)

但是如果我把文件写入磁盘然后我读了它就会出现错误

library(feather)
write_feather(x, "x.feather")
x_feather <- read_feather("x.feather")
system("rm x.feather")
testthat::expect_identical(x, x_feather)

# Error: `x` not identical to `x_feather`.
# Rows in x but not y: 1. Rows in y but not x: 1. 

0 个答案:

没有答案