listArray: listArray

Description Usage Arguments Value Examples

View source: R/listArray.R

Description

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

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)

listArray documentation built on Sept. 13, 2020, 5:19 p.m.