Learn R Programming

serocalculator (version 1.3.0)

warn.missing.strata: Warn about missing stratifying variables in a dataset

Description

Warn about missing stratifying variables in a dataset

Usage

warn.missing.strata(data, strata, dataname)

Value

a character() vector of the subset of stratifying variables that are present in pop_data

Arguments

data

the dataset that should contain the strata

strata

a data.frame() showing the strata levels that are expected to be in the dataset

dataname

the name of the dataset, for use in warning messages if some strata are missing.

Examples

Run this code
if (FALSE) {
expected_strata <- data.frame(Species = "banana", type = "orchid")

warn.missing.strata(iris, expected_strata, dataname = "iris")
}

Run the code above in your browser using DataLab