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

Error when a data.frame has a logical column #13

Closed
strboul opened this issue Jul 23, 2019 · 1 comment
Closed

Error when a data.frame has a logical column #13

strboul opened this issue Jul 23, 2019 · 1 comment
Assignees

Comments

@strboul
Copy link

@strboul strboul commented Jul 23, 2019

Thank you for the great package. I've recently observed a bug that such errors are thrown when a data.frame with a logical column is provided.

randnums <- c(0.2, 0.48, 0.91, -1.93, 0.75)
booleans <- c(TRUE, FALSE, FALSE, TRUE, FALSE)

df_without_na <- data.frame(a = randnums, b = booleans)
df_with_na <- data.frame(a = c(NA_real_, randnums, NA_real_), b = c(NA, booleans, NA)) 

df_without_na
#>       a     b
#> 1  0.20  TRUE
#> 2  0.48 FALSE
#> 3  0.91 FALSE
#> 4 -1.93  TRUE
#> 5  0.75 FALSE
df_with_na
#>       a     b
#> 1    NA    NA
#> 2  0.20  TRUE
#> 3  0.48 FALSE
#> 4  0.91 FALSE
#> 5 -1.93  TRUE
#> 6  0.75 FALSE
#> 7    NA    NA

library(magrittr)
library(inspectdf)

inspect_na(df_without_na) %>% 
  show_plot()
#> Error in if (!("ymin" %in% names(data)) | (all(data$ymin == data$ymax) & : missing value where TRUE/FALSE needed

inspect_na(df_with_na) %>% 
  show_plot()
#> Error in if (!("ymin" %in% names(data)) | (all(data$ymin == data$ymax) & : missing value where TRUE/FALSE needed
@alastairrushworth alastairrushworth self-assigned this Jul 24, 2019
@alastairrushworth
Copy link
Owner

@alastairrushworth alastairrushworth commented Jul 27, 2019

Hi @strboul thanks for raising this issue! This has now been fixed and will be added to the next CRAN release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.