check_type: Quantitatively check on variables

Description Usage Arguments

View source: R/misc.R

Description

This internal function is to be used in the prep function to ensure that the type of the variables matches the expectation. Throws an error if check fails.

Usage

1
check_type(dat, quant = TRUE)

Arguments

dat

A data frame or tibble of the training data.

quant

A logical indicating whether the data is expected to be numeric (TRUE) or a factor/character (FALSE).


recipes documentation built on April 16, 2021, 5:09 p.m.