model.reduce {RGeostats}R Documentation

Extract a sub-model from an input model.

Description

Extract a set of variables and/or a set of basic structures of an input monovariate or multivariate model (object of type model-class).

Usage

model.reduce(model, vars = NA, structs = NA)

Arguments

model

Input model (of type model-class) to reduce.

vars

Vector of indexes of the variables to extract. By default, all the variables are kept in the resulting model.

structs

Vector of indexes of the structures to extract. By default, all the structures are kept in the resulting model.

Value

A multivariate model (of type model-class) which is a sub-model of the input model.

See Also

model-class, model.extend, ...

Examples

#With the multivariate model example of RGeostats Z_multi.model

data(Z_multi.model)
plot(Z_multi.model,xlim=c(0,100))

submodel1=model.reduce(Z_multi.model,vars=c(2,3))
plot(submodel1,xlim=c(0,100))

submodel2=model.reduce(Z_multi.model,structs=c(1,2))
plot(submodel2,xlim=c(0,100))

submodel3=model.reduce(Z_multi.model,vars=c(2,3),structs=c(1,2))
plot(submodel3,xlim=c(0,100))

rm(Z_multi.model,submodel1,submodel2,submodel3)

[Package RGeostats version 11.1.2 Index]