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 #187

Merged
merged 2 commits into from
Jul 30, 2018
Merged

Remove n miss cumsum #187

merged 2 commits into from
Jul 30, 2018

Conversation

njtierney
Copy link
Owner

Description

This change means that the cumulative sum of missings across variables and cases is now not included by default into the missingness summary.

Related Issue

Fixes #186

Example

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_var_summary(airquality, add_cumsum = TRUE)
#> # 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 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
miss_case_summary(airquality, add_cumsum = TRUE)
#> # 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-31 by the reprex package (v0.2.0).

Tests

Yes, tests have been included

NEWS + DESCRIPTION

Yes

@njtierney njtierney merged commit 6aadc11 into master Jul 30, 2018
@njtierney njtierney deleted the remove-n-miss-cumsum branch July 30, 2018 23:58
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 this pull request may close these issues.

remove n_miss_cumsum from miss_*_summary by default
1 participant