ldat: Create an ldat object

Description Usage Arguments Details Value Examples

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

1
2
3

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

1
2
3
4
5
# 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)))

ldat documentation built on May 2, 2019, 4:22 a.m.