extract: Extract or Replace one Element of a 'listArray'

Description Usage Arguments Value Examples

Description

Operators acting on one element of a listArray to extract or replace it.

Usage

1
2
3
4
5
## S3 method for class 'listArray'
x[...]

## S3 replacement method for class 'listArray'
x[...] <- value

Arguments

x

object from which to extract a element or in which to replace a element.

...

indices specifying the element to extract or replace. Indices can consist of any R Object.

value

value which replaces a listArray element

Value

Returns or sets the selected element.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
l <- listArray()
l[1] <- 1
l[1]
#
l[2,3] <- "test"
l[2,3]
#
l[2:3] <- "vector"
l[2:3]
l[2,3]
#
l['iris'] <- iris
head(l['iris'])
#
l[letters[1:5]] <- letters[1:5]
l[letters[1:5]]
#
l[mean] <- mean
l[mean](0:10)

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