Skip to content

comparedf: No difference detected if column changes from integer to numeric #373

Description

@mpettis

I don't know if this is as-intended or not, but when a column changes value from 0L to 1, it changes type and value, and comparedf() doesn't alert me to the change.

library(arsenal)
library(tibble)

#;; Note, x is integer in first tibble, a dbl in the second one.
comparedf(tibble(x=0L), tibble(x=1))
#> Compare Object
#> 
#> Function Call: 
#> comparedf(x = tibble(x = 0L), y = tibble(x = 1))
#> 
#> Shared: 1 non-by variables and 1 observations.
#> Not shared: 0 variables and 0 observations.
#> 
#> Differences found in 0/0 variables compared.
#> 0 variables compared have non-identical attributes.

Created on 2024-12-17 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions