Data Structures, Summaries, and Visualisations for Missing Data
Overview
Missing values are ubiquitous in data and need to be explored and handled in the initial stages of analysis. 'naniar' provides data structures and functions that facilitate the plotting of missing values and examination of imputations. This allows missing data dependencies to be explored with minimal deviation from the common work patterns of 'ggplot2' and tidy data. The work is fully discussed at Tierney & Cook (2023) doi:10.18637/jss.v105.i07.
New
- Implement
impute_fixed,impute_zero, andimpute_factor. notably these do not implement "scoped variants" which were previously implemented - for example,impute_fixed_ifetc. This is in favour of using the newacrossworkflow withindplyr, and it is easier to maintain. #261 - Add
digitargument tomiss_var_summaryto help display %missing data correctly when there is a very small fraction of missingness. #284 - Implemented
impute_mode- resolves #213. geom_miss_point()works withshapeargument #290- Fix bug with
all_complete, which was implemented as!anyNA(x)but should beall(complete.cases(x)). - Correctly implement
any_na()(andany_miss()) andany_complete(). Rework examples to demonstrate workflow for finding complete variables.
Bug fixes
- Fix bug with
shadow_longnot working when gathering variables of mixed type. Fix involves specifying a value transform, which defaults to character. #314 - Implement
Date,POSIXctandPOSIXltmethods forimpute_below()- #158 - Provide replace_na_with, a complement to replace_with_na - #129
- Fix bug with
gg_miss_fctwhere it used a deprecated function from forcats - #342
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
Misc
- Use
cli::cli_abortandcli::cli_warninstead ofstopandwarn(#326) - Use
expect_snapshotinstead ofexpect_error(#326)
Changes
- Soft deprecated
shadow_shift- #193 - Soft deprecate
miss_case_cumsum()andmiss_var_cumsum()- #257
From NEWS.md in the release
Install
Health
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-arm64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
‘impute_below.Rd’ ‘impute_factor.Rd’ ‘impute_fixed.Rd’
‘impute_mean.Rd’ ‘impute_median.Rd’ ‘impute_mode.Rd’ ‘impute_zero.Rd’
‘replace_na_with.Rd’r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
'impute_below.Rd' 'impute_factor.Rd' 'impute_fixed.Rd'
'impute_mean.Rd' 'impute_median.Rd' 'impute_mode.Rd' 'impute_zero.Rd'
'replace_na_with.Rd'- NOTE1 OK, 12 NOTENow
- NOTE2 OK, 11 NOTE2026-06-08
- ERROR1 OK, 11 NOTE, 1 ERROR2026-06-07
- NOTE4 OK, 10 NOTE2026-03-10
Documentation
- Help pages
- 102 (3 internal)includes a package overview page
- Examples that run
- 95%87 run in a plain check · 4 never run · 1 hold no code
- Exported functions with examples
- 93%
- Documented parameters
- 100%
- Return-value docs
- 88%
- Help pages citing references
- 1%
Downloads
Repository
- PRs merged (all time)
- 99%
- Median days to close, 50 most recently updated closed issues
- 1,156
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
16 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/njtierney/naniar on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2025-04-30 · The repository has a site deploy workflow
pkgdown site last built 2025-04-30
Show all practicesHide 3 practices
Dependencies
Installing naniar adds 47 packages (23 with compiled code, 41 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, UpSetR 3.9 MB.
Show all 16 packagesHide all 16 packages
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.1.0Latest2024-03-05 · current release · diff ↗ ·
added 5 exports
impute_factor, impute_fixed, impute_mode, impute_zero, replace_na_with - RR 4.3.0 released · 2023-04-21
- 1.0.02023-02-02 · diff ↗ ·
removed 1 export
to_basic.GeomMissPointadded 2 exports
set_n_miss, set_prop_miss - RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.6.1
- 0.6.0
- 0.5.22020-06-29 · diff ↗
- 0.5.12020-05-01 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.5.0
- RR 3.6.0 released · 2019-04-26
- 0.4.2
Show 8 earlier eventsHide 8 earlier events
- 0.4.12018-11-20 · diff ↗
- 0.4.0.02018-09-10 · diff ↗ ·
removed 1 export
are_shadowadded 26 exports
.where, any_shade, are_shade, gg_miss_upset, impute_below_all, impute_median, impute_median_all, impute_median_at, impute_median_if, is_nabular, is_shade, nabular, new_nabular, new_shadow, pct_complete_case, pct_complete_var, pct_miss_case, pct_miss_var, prop_complete_case, prop_complete_var, prop_miss_case, prop_miss_var, recode_shadow, shade, shadow_long, which_are_shade - 0.3.12018-06-08 · diff ↗
- 0.3.02018-06-07 · diff ↗ ·
added 29 exports
all_complete, all_miss, all_na, any_complete, any_miss, any_na, are_na, are_shadow, as_shadow_upset, complete_case_pct, complete_case_prop, complete_var_pct, complete_var_prop, impute_below, impute_below_at, impute_below_if, impute_mean, impute_mean_all, impute_mean_at, impute_mean_if, is_na, is_shadow, miss_var_which, n_case_complete, n_case_miss, n_var_complete, n_var_miss, unbind_data, unbind_shadow - RR 3.5.0 released · 2018-04-23
- 0.2.02018-02-09 · diff ↗ ·
removed 2 exports
miss_case_cumsum, miss_var_cumsumadded 12 exports
add_miss_cluster, miss_scan_count, n_complete_row, n_miss_row, prop_complete_row, prop_miss_row, replace_with_na, replace_with_na_all, replace_with_na_at, replace_with_na_if, where_na, which_na - 0.1.02017-08-09
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-08-09
- Total releases
- 14 / 9 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.1.2
- Bundled data
- 70 KB / 5 files
- Download size
- 2.7 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("naniar")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v105.i07.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.