warn_if_continuous {stratamatch}R Documentation

Warn if continuous

Description

Throws an error if a column is continuous

Usage

warn_if_continuous(column, name, force, n)

Arguments

column

vector or factor column from a data.frame

name

name of the input column

force

a boolean. If true, warn but do not stop

n

the number of rows in the data set

Details

Not meant to be called externally. Only categorical or binary covariates should be used to manually stratify a data set. However, it's hard to tell for sure if something is continuous or just discrete with real-numbered values. Returns without throwing an error if the column is a factor, but throws an error or warning if the column has many distinct values.

Value

Does not return anything


[Package stratamatch version 0.1.9 Index]