sub-sub-.gmCgram: Subsetting of gmCgram variogram structures

[[.gmCgramR Documentation

Subsetting of gmCgram variogram structures

Description

Extraction or combination of nested structures of a gmCgram object

Usage

## S3 method for class 'gmCgram'
x[[i, ...]]

Arguments

x

gmCgram variogram object

i

indices of the structures that are desired to be kept (0=nugget) or removed (see details)

...

extra arguments for generic functionality

Details

This function can be used to: extract the nugget (i=0), extract some structures (i=indices of the structures, possibly including 0 for the nugget), or filter some structures out (i=negative indices of the structures to remove; nugget will always removed in this case). If you want to extract "slots" or "elements" of the variogram, use the $-notation. If you want to extract variables of the variogram matrices, use the [-notation. The contrary operation (adding structures together) is obtained by summing (+) two gmCgram objects.

Value

a gmCgram variogram object with the desired structures only.

See Also

Other gmCgram functions: [.gmCgram(), as.function.gmCgram(), as.gmCgram.variogramModelList(), length.gmCgram(), ndirections(), plot.gmCgram(), variogramModelPlot()

Examples

utils::data("variogramModels")
v1 = setCgram(type=vg.Gau, sill=diag(2), anisRanges = 3*diag(c(3,1)))
v2 = setCgram(type=vg.Exp, sill=0.3*diag(2), anisRanges = 0.5*diag(2))
vm = v1+v2
vm[[1]]

gmGeostats documentation built on April 18, 2023, 5:08 p.m.