assert_type_: Check if type is as expected (without using non standard...

View source: R/utilities.R

assert_type_R Documentation

Check if type is as expected (without using non standard evaluation)

Description

Check if type is as expected (without using non standard evaluation)

Usage

assert_type_(var, types, var_name, allow_na = TRUE)

Arguments

var

Variable whose type should be checked

types

(vector of strings) A vector of allowed type values

var_name

(string) Name of the variable passed in in var. This name is used for the error message if it has the wrong type.

allow_na

(logical) Is a missing value allowed?


R-package/styledTables documentation built on Feb. 6, 2024, 2:21 a.m.