ldat: Create an ldat object

View source: R/ldat.R

ldatR Documentation

Create an ldat object

Description

This function creates an ldat object, which behaves similar to a data.frame except that its columns are lvec. This allows and ldat to have an arbitrary large number of rows without running into memory problems.

Usage

ldat(...)

is_ldat(x)

Arguments

...

these arguments are of either the form ‘tag = value’ or ‘value’. Each argument becomes a column in the ldat. All columns are required to have the same length.

x

object for which to check if it is of type ldat

Details

Each of the arguments of ldat is converted to an lvec when it isn't already and lvec using calls to as_lvec. The arguments are required to all have the same length (unlike data.frame).

Value

An object of type ldat. This object is basically a list with lvec objects.

Examples

# Create ldat object from r-objects
a <- ldat(id = 1:20, x = letters[1:20], y = rnorm(20))
# this is identical to
a <- ldat(id = as_lvec(1:20), x = as_lvec(letters[1:20]), 
    y = as_lvec(rnorm(20)))


djvanderlaan/lvec_stats documentation built on Oct. 4, 2022, 7:02 p.m.