| strlen | R Documentation |
Get and set the maximum string length of a character lvec
strlen(x) strlen(x) <- value
x |
a lvec of type character. |
value |
the new value of the maximum string length. |
a <- as_lvec('123')
strlen(a) # = 3
# Strings are truncated to strlen
lset(a, 1, '123456')
print(a) # '123'
strlen(a) <- 5
lset(a, 1, '123456')
print(a) # '12345'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.