| charvec | R Documentation |
Builds a ‘charvec', charport’s reference ALTREP character vector class, from the given values. A 'charvec' is an ordinary character vector to R code ('typeof(x)' is '"character"'); its strings live as byte views in stable native memory blocks and are only converted to R's interned 'CHARSXP' strings when something forces materialization.
charvec(...)
... |
values to combine, as in [c()]; non-character values are coerced with [as.character()]. |
Element bytes and encoding marks are preserved verbatim. 'charvec' is a storage/reference class, not an encoding-normalization layer; translation policy belongs in consumers built above charport. 'NA_character_' is preserved.
A 'charvec' (an ALTREP character vector).
x <- charvec("hello", "world", NA)
is_charvec(x)
x[1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.