让我们考虑一下 tibble
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.