assess_completeness {eHDPrep}R Documentation

Assess completeness of a dataset

Description

Assesses and visualises completeness of the input data across both rows (samples) and columns (variables).

Usage

assess_completeness(data, id_var, plot = TRUE)

Arguments

data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).

id_var

An unquoted expression which corresponds to a variable (column) in data which identifies each row (sample).

plot

Should plots be rendered when function is run? (Default: TRUE)

Details

Returns a list of completeness assessments:

variable_completeness

A tibble detailing completeness of variables (columns) (via variable_completeness).

row_completeness

A tibble detailing completeness of rows (via row_completeness).

completeness_plot

A plot of row and variable (column) completeness (via plot_completeness).

completeness_heatmap

A clustered heatmap of cell completeness (via completeness_heatmap).

plot_completeness_heatmap

A function which creates a clean canvas before plotting the completeness heatmap.

Value

list of completeness tibbles and plots

See Also

Other measures of completeness: compare_completeness(), completeness_heatmap(), plot_completeness(), row_completeness(), variable_completeness()

Examples

data(example_data)
res <- assess_completeness(example_data, patient_id)

# variable completeness table
res$variable_completeness

# row completeness table
res$row_completeness

# show completeness of rows and variables as a bar plot
res$completeness_plot

# show dataset completeness in a clustered heatmap
# (this is similar to res$completeness_heatmap but ensures a blank canvas is first created)
res$plot_completeness_heatmap(res)


[Package eHDPrep version 1.3.3 Index]