sub-sub-.bk-set: INDEXING METHODS

[[.bk<-R Documentation

INDEXING METHODS

Description

Replace a bk list element (double-bracket assign)

Usage

## S3 method for class ''bk<-''
x[[value]]

Arguments

x

a bk object

value

the replacement object

Details

Replaces entries in the bk list object. This does no validation (since bk_validate uses ⁠[[<-⁠, so there would be an infinite recursion problem) so users are advised to pass the results to bk_validate afterwards unless they know what they're doing.

Value

a "bk" object

Examples

# bk list elements are interrelated - for example gres must match spacing in gyx
g = bk_validate(list(gval=rnorm(10^2), gdim=10, gres=0.5))
g[['gres']] = 2 * g[['gres']]
g[['gyx']] = lapply(g[['gyx']], function(x) 2*x)
bk_validate(g)


deankoch/pkern documentation built on Oct. 26, 2023, 8:54 p.m.