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

Improve miss_summary by providing a nice print method #316

Open
njtierney opened this issue Apr 6, 2023 · 1 comment
Open

Improve miss_summary by providing a nice print method #316

njtierney opened this issue Apr 6, 2023 · 1 comment
Milestone

Comments

@njtierney
Copy link
Owner

njtierney commented Apr 6, 2023

As discussed with @dicook, The aim with this is provide a ricer overall summary of missingness, providing information on:

  • number of obs
  • number of variables
  • number of missing values
  • prop missings
  • number/prop of variables with missing values
  • number/prop of cases with missings
  • some 5 number summary of missingness

This could also be used iteratively so you can run this summary after making changes to missings and see what the impact is.

I think the way to do this is to write a print method for naniar::miss_summary(airquality), which is a function that does nearly every missingness summary. So you still get the underlying data when you do the summary, but it is presented in a really nice way.

@runkelcorey
Copy link

Workshopping this.

> naniar::miss_summary(airquality)
153 observations of 6 variables
44 (4.8%) of 918 values are
	* NA
	* -99
	* ""
2   of 6   (33.3%) variables have missing values
252 of 918 (27.5%) observations have missing values

For a 5-number summary, you could add a min/max/median amount of missing values for variables and for cases, but imho a compact print method is preferable. Many of us still work on our laptop, where screen real estate is a premium.

2   of 6   (33.3%) variables have missing values
Missing values are distributed throughout variables:
min median max
2   5      5

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

No branches or pull requests

2 participants