Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: inspect_num() not able to deal with different ranges in df2 #48

Open
RoelVerbelen opened this issue Jul 7, 2023 · 0 comments · May be fixed by #51
Open

Bug: inspect_num() not able to deal with different ranges in df2 #48

RoelVerbelen opened this issue Jul 7, 2023 · 0 comments · May be fixed by #51

Comments

@RoelVerbelen
Copy link

Hi Alastair,

I ran into this issue where inspect_num() is not able to handle cases when the numeric variable has a different range in the comparison data set df2. It seems the histogram breaks are computed on the range seen in df1 alone and then applied to df2 rather than computed on the range of df1 and df2 jointly.

Here's a minimal reprex:

library(inspectdf)
data("starwars", package = "dplyr")
starwars1 <- starwars[, "height"]
starwars2 <- starwars[, "height"] + 100
inspect_num(starwars1, starwars2)
#> Error in hist.default(col_i, plot = FALSE, right = TRUE, breaks = hist_breaks): some 'x' not counted; maybe 'breaks' do not span range of 'x'

Created on 2023-07-07 with reprex v2.0.2

cregouby added a commit to cregouby/inspectdf that referenced this issue Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant