expect-vars {edibble}R Documentation

Expected type of data entry

Description

These functions should be used within expect_vars where variables that are to be recorded are constraint to the expected values when exported as an xlsx file by ⁠export_design().⁠ The functions to set a particular value type (numeric, integer, date, time and character) are preceded by "to_be_" where the corresponding restriction set by with_value().

Usage

to_be_numeric(range)

to_be_integer(range)

to_be_date(range)

to_be_time(range)

to_be_character(length)

to_be_factor(levels)

Arguments

range, length

A named list with two elements: "operator" and "value" as provided by helper with_value() that gives the possible range of values that the expected type can take.

levels

A character vector with the factor levels.

Value

A record type.


[Package edibble version 1.1.0 Index]