Skip to content

as_ascii table does not handle NA values in some cases. #132

@kieranjmartin

Description

@kieranjmartin
library(diffdf)
library(tibble)

d1 <- tibble(
  id = c(1, 2),
  dt1 = lubridate::ymd_hms(
    "2024-01-10 01-02-03",
    "2024-01-24 14-12-49"
  )
)
d2 <- tibble(
  id = c(1, 2),
  dt1 = lubridate::ymd_hms(
    "2024-01-10 01-02-03",
    NA
  )
)

diffdf(d1, d2, "id", file = "comparison.lst")

Causes as_ascii_table to error, in particular https://github.com/gowerc/diffdf/blob/master/R/ascii_tables.R#L89 returns NA_real which then causes https://github.com/gowerc/diffdf/blob/master/R/ascii_tables.R#L93 to error

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions