Skip to main content

Module as_character

Module as_character 

Source
Expand description

AsCharacter / AsCharacterVec: a label argument read the way R’s as.character() reads it, from any atomic vector, a factor by its labels. The reading rules are documented on AsCharacterVec.

Structs§

AsCharacter
A character scalar read like R’s as.character(): from an atomic vector of length 1 of any type, a factor by its label. NA of any type is None.
AsCharacterVec
A character vector read like R’s as.character(): from an atomic vector of any type, a factor by its labels. NA of any type is None.

Functions§

check_length_one 🔒
check_type 🔒
Refuse every SEXPTYPE that is not an atomic vector. STRSXP is named as the expected type because that is what the value becomes.
dispatch_as_character 🔒
Evaluate as.character(x) for a classed x, so its method decides the text (factor labels, formatted dates, …).
read_character 🔒
Read any atomic vector into Vec<Option<String>> through R’s own conversion to character. Also labels double group keys (dataframe::group).