Learn R Programming

DGVM3D (version 1.0.0)

initStand: Initialize the model Stand

Description

Initialize the model Stand

Usage

initStand(npatch = 1, year = 2000, soil = c(0, -0.5, -1.5), z = 0,
  layout = "square", composition = "spatial", dist = 0.05)

Arguments

npatch

number of patches

year

the initialization year

soil

a vector or matrix of soil depths.

z

the height of each patch.

layout

patch layout ('square' or 'linear'), a two element vector with number of rows/colums. A matrix for layout (not yet ready).

composition

'spatial' or 'temporal'

dist

the fractional distance between the hexagons

Value

a Stand-class

Details

If soil is a matrix, the number of columns must be equal to npatch. In that way each patch can have its own soil depth. The patches represented as hexagons can either be arranged in a square or in a line. The later one for example to represent a time series (succession).

Examples

Run this code
# NOT RUN {
stand <- initStand(npatch=9, z=sort(rnorm(9, sd=2)))
stand3D(stand)

stand <- initStand(npatch=9, z=sort(rnorm(9, sd=2)), layout='linear')
stand3D(stand)
# }

Run the code above in your browser using DataLab