listArray {listArray}R Documentation

listArray

Description

Creates either an empty listArray object or a listArray object from a vector, array or list. See also vignette("listArray").

Usage

listArray(x, ...)

## Default S3 method:
listArray(x, use.names = TRUE, ignore = NULL, env = FALSE, ...)

Arguments

x

vector, array or list

...

further arguments given to new.env if an environment is used

use.names

logical: if the names from x or indices should be used (default: TRUE)

ignore

values to ignore for the listArray object

env

logical: if the listArray creates a list or an environment (default: FALSE)

Value

a listArray object

Examples

# empty listArray
l <- listArray()
# listArray from a numerical vector
v <- 1:5
l <- listArray(v)
# listArray from a text vector
v <- letters[1:5]
l <- listArray(v)
#' # listArray from a matrix
m <- matrix(1:9, 3, 3)
l <- listArray(m)
#' # listArray from a list
v <- as.list(1:5)
l <- listArray(v)

[Package listArray version 0.1.1 Index]