naniar1.1.0 package

Data Structures, Summaries, and Visualisations for Missing Data

add_any_miss

Add a column describing presence of any missing values

add_label_missings

Add a column describing if there are any missings in the dataset

add_label_shadow

Add a column describing whether there is a shadow

add_miss_cluster

Add a column that tells us which "missingness cluster" a row belongs t...

add_n_miss

Add column containing number of missing data values

add_prop_miss

Add column containing proportion of missing data values

add_shadow

Add a shadow column to dataframe

add_shadow_shift

Add a shadow shifted column to a dataset

add_span_counter

Add a counter variable for a span of dataframe

any-all-na-complete

Identify if there are any or all missing or complete values

any_row_miss

Helper function to determine whether there are any missings

as_shadow

Create shadows

as_shadow_upset

Convert data into shadow format for doing an upset plot

bind_shadow

Bind a shadow dataframe to original data

cast_shadow

Add a shadow column to a dataset

cast_shadow_shift

Add a shadow and a shadow_shift column to a dataset

cast_shadow_shift_label

Add a shadow column and a shadow shifted column to a dataset

draw_key

Key drawing functions

gather_shadow

Long form representation of a shadow matrix

geom_miss_point

geom_miss_point

gg_miss_case

Plot the number of missings per case (row)

gg_miss_case_cumsum

Plot of cumulative sum of missing for cases

gg_miss_fct

Plot the number of missings for each variable, broken down by a factor

gg_miss_span

Plot the number of missings in a given repeating span

gg_miss_upset

Plot the pattern of missingness using an upset plot.

gg_miss_var

Plot the number of missings for each variable

gg_miss_var_cumsum

Plot of cumulative sum of missing value for each variable

gg_miss_which

Plot which variables contain a missing value

impute_below.numeric

Impute numeric values below a range for graphical exploration

impute_below

Impute data with values shifted 10 percent below range.

impute_below_all

Impute data with values shifted 10 percent below range.

impute_below_at

Scoped variants of impute_below

impute_below_if

Scoped variants of impute_below

impute_factor

Impute a factor value into a vector with missing values

impute_fixed

Impute a fixed value into a vector with missing values

impute_mean

Impute the mean value into a vector with missing values

impute_median

Impute the median value into a vector with missing values

impute_mode

Impute the mode value into a vector with missing values

impute_zero

Impute zero into a vector with missing values

is_shade

Detect if this is a shade

label_miss_1d

Label a missing from one column

label_miss_2d

label_miss_2d

label_missings

Is there a missing value in the row of a dataframe?

mcar_test

Little's missing completely at random (MCAR) test

miss-pct-prop-defunct

Proportion of variables containing missings or complete values

miss_case_cumsum

Summarise the missingness in each case

miss_case_summary

Summarise the missingness in each case

miss_case_table

Tabulate missings in cases.

miss_prop_summary

Proportions of missings in data, variables, and cases.

miss_scan_count

Search and present different kinds of missing values

miss_summary

Collate summary measures from naniar into one tibble

miss_var_cumsum

Cumulative sum of the number of missings in each variable

miss_var_run

Find the number of missing and complete values in a single run

miss_var_span

Summarise the number of missings for a given repeating span on a varia...

miss_var_summary

Summarise the missingness in each variable

miss_var_table

Tabulate the missings in the variables

miss_var_which

Which variables contain missing values?

n-var-case-complete

The number of variables with complete values

n-var-case-miss

The number of variables or cases with missing values

n_complete

Return the number of complete values

n_complete_row

Return a vector of the number of complete values in each row

n_miss

Return the number of missing values

n_miss_row

Return a vector of the number of missing values in each row

nabular

Convert data into nabular form by binding shade to it

naniar-ggproto

naniar-ggproto

naniar

naniar

pct-miss-complete-case

Percentage of cases that contain a missing or complete values.

pct-miss-complete-var

Percentage of variables containing missings or complete values

pct_complete

Return the percent of complete values

pct_miss

Return the percent of missing values

plotly_helpers

Plotly helpers (Convert a geom to a "basic" geom.)

prop-miss-complete-case

Proportion of cases that contain a missing or complete values.

prop-miss-complete-var

Proportion of variables containing missings or complete values

prop_complete

Return the proportion of complete values

prop_complete_row

Return a vector of the proportion of missing values in each row

prop_miss

Return the proportion of missing values

prop_miss_row

Return a vector of the proportion of missing values in each row

recode_shadow

Add special missing values to the shadow matrix

reexports

Objects exported from other packages

replace_na_with

Replace NA value with provided value

replace_to_na

Replace values with missings

replace_with_na

Replace values with missings

replace_with_na_all

Replace all values with NA where a certain condition is met

replace_with_na_at

Replace specified variables with NA where a certain condition is met

replace_with_na_if

Replace values with NA based on some condition, for variables that mee...

scoped-impute_mean

Scoped variants of impute_mean

scoped-impute_median

Scoped variants of impute_median

set-prop-n-miss

Set a proportion or number of missing values

shade

Create new levels of missing

shadow_long

Reshape shadow data into a long format

shadow_shift

Shift missing values to facilitate missing data exploration/visualisat...

stat_miss_point

stat_miss_point

unbinders

Unbind (remove) shadow from data, and vice versa

where

Split a call into two components with a useful verb name

where_na

Which rows and cols contain missings?

which_are_shade

Which variables are shades?

which_na

Which elements contain missings?

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>.

  • Maintainer: Nicholas Tierney
  • License: MIT + file LICENSE
  • Last published: 2024-03-05