as_lvec: Converts a primitive R-vector to lvec

Description Usage Arguments Value Examples

View source: R/lvec.R

Description

Converts a primitive R-vector to lvec

Usage

1

Arguments

x

the object to convert. This can be a vector of type character, integer, numeric or logical.

Value

Returns an lvec of the same type as x. When x is already and lvec, x is returned. For character vectors the maximum length of the lvec is set to the maximum length found in x.

Examples

1
2
3
# convert a character vector to lvec
x <- as_lvec(letters)
lget(x, 1:26)

djvanderlaan/lvec documentation built on Aug. 16, 2018, 11:02 a.m.