domain.set {RGeostats}R Documentation

Define the Reference Domain

Description

Define the Reference Domain

Usage

domain.set(domain = 0, verbose = TRUE, flag.update = TRUE)

Arguments

domain

Value of the Reference Domain. Setting the value to 0 cancels any domaining.

verbose

Verbose flag. When switched ON, any modification of the Reference Domain is printed out

flag.update

When TRUE, the Environment File is updated.

Details

When a Reference Domain is specified (value != 0), for all the Db involved in subsequent calculations (used both in Input or Output), only the samples such that the "domain" variable is equal to the Reference Domain value are considered as active.

The "domain" variable is a variable which corresponds to the locator "dom".

Examples

# This example fills a grid with non-conditional simulations
# with a Model which varies per domain

# Create the grid
grid = db.create(nx=c(100,100))

# Simulate 3 domains using PGS
ncol = 3
rule = rule.create(c("S","S","F1","F2","F3"))
model.pgs = model.create(vartype="Cubic",range=30)
grid = simpgs(,grid,rule=rule,model1=model.pgs)

# Define each color as a Domain
grid = db.locate(grid,"SimPGS*","dom")

# Loop on the Domains
types = c("Nugget Effect","Gaussian","Exponential")
for (idom in 1:ncol)
{
  domain.set(domain=idom)
  model = model.create(vartype=types[idom],range=30)
  grid  = simtub(,grid,model,nbtuba=1000)
}
grid = db.merge(grid,names="Simu.*")
plot(grid,title="Merged Domains")

[Package RGeostats version 14.0.10 Index]