Skip to main content

Module coercion

Module coercion 

Source
Expand description

Coercion builtins: as.integer, as.double, as.character, etc.

Each function coerces an R value to a specific type, following R’s standard coercion rules.

StaticsΒ§

__BUILTIN_REG_BUILTIN_AS_CALL πŸ”’
__BUILTIN_REG_BUILTIN_AS_CHARACTER πŸ”’
__BUILTIN_REG_BUILTIN_AS_DATA_FRAME πŸ”’
__BUILTIN_REG_BUILTIN_AS_FACTOR πŸ”’
__BUILTIN_REG_BUILTIN_AS_INTEGER πŸ”’
__BUILTIN_REG_BUILTIN_AS_LIST πŸ”’
__BUILTIN_REG_BUILTIN_AS_LOGICAL πŸ”’
__BUILTIN_REG_BUILTIN_AS_MATRIX πŸ”’
__BUILTIN_REG_BUILTIN_AS_NAME πŸ”’
__BUILTIN_REG_BUILTIN_AS_NUMERIC πŸ”’
__BUILTIN_REG_BUILTIN_AS_PAIRLIST πŸ”’
__BUILTIN_REG_BUILTIN_AS_VECTOR πŸ”’
__BUILTIN_REG_BUILTIN_MATCH_FUN πŸ”’

FunctionsΒ§

builtin_as_call πŸ”’
Convert a list to a call object (Language).
builtin_as_character πŸ”’
Coerce an object to character (string).
builtin_as_data_frame πŸ”’
Coerce an object to a data frame.
builtin_as_factor πŸ”’
Coerce an object to a factor.
builtin_as_integer πŸ”’
Coerce an object to integer.
builtin_as_list πŸ”’
Coerce an object to a list.
builtin_as_logical πŸ”’
Coerce an object to logical.
builtin_as_matrix πŸ”’
Coerce an object to a matrix.
builtin_as_name πŸ”’
Coerce a string to a symbol/name.
builtin_as_numeric πŸ”’
Coerce an object to double (numeric).
builtin_as_pairlist πŸ”’
Convert a list to a pairlist. In miniR, pairlists are represented as lists.
builtin_as_vector πŸ”’
Coerce an object to a vector, stripping all attributes.
builtin_match_fun πŸ”’
Look up a function by name or return it if already a function.
factor_to_character πŸ”’
Convert a factor (integer codes + levels attr) to a character vector of labels.
is_factor πŸ”’
Check whether an RVector has class β€œfactor”.
rvalue_to_expr πŸ”’
Convert an RValue to an Expr for constructing Language objects.