Count missing observations for variables contained in a dataset.

count_missing(data, vars)

Arguments

data

A dataset returned by ecdata::pin_nsclc() and preprocessed using preprocess().

vars

A character vector of the names of variables to count the number of missing observations for. If the vector is named, then the names are used as labels for the variables.

Value

An object of class missing_counts inheriting from dplyr::tibble with the following columns:

label

The label for each variable in vars.

source_type

Indicates whether the data is from the external control or the trial.

analysis_num

An integer indicating the analyis number.

n_missing

The number of missing observations.

n

The number of total observations.

prop_missing

The proportion of observations that are missing.