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

remove n_miss_cumsum from miss_*_summary by default #186

Closed
njtierney opened this issue Jul 30, 2018 · 0 comments · Fixed by #187
Closed

remove n_miss_cumsum from miss_*_summary by default #186

njtierney opened this issue Jul 30, 2018 · 0 comments · Fixed by #187
Milestone

Comments

@njtierney
Copy link
Owner

At the moment miss_var_summary and miss_case_summary include the cumulative sum of missings in the variables and cases as they were presented. This can be a useful summary to include, but I don't think that this is a common enough use case to include it by default - so it will be moved to an option called add_cumsum that handles this.

So what I'll have is:

Before

library(naniar)

miss_var_summary(airquality)
#> # A tibble: 6 x 4
#>   variable n_miss pct_miss n_miss_cumsum
#>   <chr>     <int>    <dbl>         <int>
#> 1 Ozone        37    24.2             37
#> 2 Solar.R       7     4.58            44
#> 3 Wind          0     0               44
#> 4 Temp          0     0               44
#> 5 Month         0     0               44
#> 6 Day           0     0               44
miss_case_summary(airquality)
#> # A tibble: 153 x 4
#>     case n_miss pct_miss n_miss_cumsum
#>    <int>  <int>    <dbl>         <int>
#>  1     5      2     33.3             2
#>  2    27      2     33.3             9
#>  3     6      1     16.7             3
#>  4    10      1     16.7             4
#>  5    11      1     16.7             5
#>  6    25      1     16.7             6
#>  7    26      1     16.7             7
#>  8    32      1     16.7            10
#>  9    33      1     16.7            11
#> 10    34      1     16.7            12
#> # ... with 143 more rows

Created on 2018-07-30 by the reprex package (v0.2.0).

After

library(naniar)

miss_var_summary(airquality)
#> # A tibble: 6 x 3
#>   variable n_miss pct_miss
#>   <chr>     <int>    <dbl>
#> 1 Ozone        37    24.2 
#> 2 Solar.R       7     4.58
#> 3 Wind          0     0   
#> 4 Temp          0     0   
#> 5 Month         0     0   
#> 6 Day           0     0
miss_case_summary(airquality)
#> # A tibble: 153 x 3
#>     case n_miss pct_miss
#>    <int>  <int>    <dbl>
#>  1     5      2     33.3
#>  2    27      2     33.3
#>  3     6      1     16.7
#>  4    10      1     16.7
#>  5    11      1     16.7
#>  6    25      1     16.7
#>  7    26      1     16.7
#>  8    32      1     16.7
#>  9    33      1     16.7
#> 10    34      1     16.7
#> # ... with 143 more rows

Created on 2018-07-30 by the reprex package (v0.2.0).

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