[[.sk<- {snapKrig} | R Documentation |
sk_methods.R Dean Koch, 2022 S3 methods for sk grid list objects
Description
Replace a sk list element (double-bracket assign)
Usage
## S3 method for class ''sk<-''
x[[value]]
Arguments
x |
a sk object |
value |
the replacement object |
Details
Replaces entries in the sk list object. This does no validation. If it did, then
sk_validate
would have an infinite recursion problem (it uses [[<-
). Users should
pass the results to sk_validate
afterwards unless they know what they're doing.
Value
a "sk" object
Examples
# sk list elements are interrelated - for example gres must match spacing in gyx
g = sk_validate(list(gval=stats::rnorm(10^2), gdim=10, gres=0.5))
g[['gres']] = 2 * g[['gres']]
g[['gyx']] = lapply(g[['gyx']], function(x) 2*x)
sk_validate(g)
[Package snapKrig version 0.0.2 Index]