-
Notifications
You must be signed in to change notification settings - Fork 47
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
vis_miss() column %s NA when % = 0.1 #62
Comments
njtierney
added a commit
that referenced
this issue
Mar 20, 2018
Sorry I have overlooked this. This is indeed the case, thank you so much for linking to this line of code, this has made this much easier to debug! OK, so here is pre the change: library(visdat)
library(tibble)
temp <- rnorm(n = 10000,
mean = 25,
sd = 2.5)
temp[1:10] <- NA
wind <- rnorm(n = 10000,
mean = 15,
sd = 7.5)
wind[1:12] <- NA
ozone <- rnorm(n = 10000,
mean = 43,
sd = 30)
ozone[1:8] <- NA
dat <- tibble(temp,
wind,
ozone)
dat
#> # A tibble: 10,000 x 3
#> temp wind ozone
#> <dbl> <dbl> <dbl>
#> 1 NA NA NA
#> 2 NA NA NA
#> 3 NA NA NA
#> 4 NA NA NA
#> 5 NA NA NA
#> 6 NA NA NA
#> 7 NA NA NA
#> 8 NA NA NA
#> 9 NA NA 16.3
#> 10 NA NA 4.26
#> # ... with 9,990 more rows
vis_miss(dat) Created on 2018-03-20 by the reprex package (v0.2.0). This once I made a change to lines 76 and 80 library(visdat)
library(tibble)
temp <- rnorm(n = 10000,
mean = 25,
sd = 2.5)
temp[1:10] <- NA
wind <- rnorm(n = 10000,
mean = 15,
sd = 7.5)
wind[1:12] <- NA
ozone <- rnorm(n = 10000,
mean = 43,
sd = 30)
ozone[1:8] <- NA
dat <- tibble(temp,
wind,
ozone)
dat
#> # A tibble: 10,000 x 3
#> temp wind ozone
#> <dbl> <dbl> <dbl>
#> 1 NA NA NA
#> 2 NA NA NA
#> 3 NA NA NA
#> 4 NA NA NA
#> 5 NA NA NA
#> 6 NA NA NA
#> 7 NA NA NA
#> 8 NA NA NA
#> 9 NA NA 47.1
#> 10 NA NA 17.3
#> # ... with 9,990 more rows
vis_miss(dat) Created on 2018-03-20 by the reprex package (v0.2.0). I think that is it - but please feel free to open this if it doesn't work :) |
njtierney
added a commit
that referenced
this issue
Mar 20, 2018
fix bug in printing percentage NA - close #62
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a column with 0.1% missing, and the column percentage is NA instead of 0.1%. I think the issue is that the
case_when()
call inlabel_col_missing_pct
doesn't account for the case whenx == 0.1
; guessing it should be fixed by changing line 80 to>=
instead of>
. My attempts at a reprex were failing, but happy to try again or submit a PR if either would help!visdat/R/internals.R
Lines 78 to 82 in de3186b
The text was updated successfully, but these errors were encountered: