Learn R Programming

TapeS (version 0.13.3)

tprTrees: constructor for class tprTrees

Description

constructor for class tprTrees

Usage

tprTrees(
  spp = 1L,
  Dm = list(c(30, 28)),
  Hm = list(c(1.3, 5)),
  Ht = 30,
  sHt = rep(0, length(Ht)),
  inv = NULL,
  Rfn = NULL,
  ...
)

Value

object of class tprTrees.

Arguments

spp

species code, see tprSpeciesCode

Dm

measurements of diameter along trunk

Hm

height of measurements along trunk

Ht

tree height

sHt

standard deviation of stem height Ht. Can be 0 if height was measured without error.

inv

indicator (0-5) for inventory to assess taper form; numeric scalar see FormTariff

Rfn

function to populate residual variance matrix R

...

arguments to be passed to initialize()

Details

constructor for a tprTrees object, includes a check on monotonicity of the taper curve.

Examples

Run this code
# just define a tree
tpr <- tprTrees(spp=1, Dm=30, Hm=1.3, Ht=27)
plot(tpr)
# define 2 trees with only dbh
tpr <- tprTrees(spp=c(1,3), Dm=c(30, 35), Hm=c(1.3, 1.3), Ht=c(27, 30))
plot(tpr)
# define 2 trees with several measurement
tpr <- tprTrees(spp=c(1,3), Dm=list(c(30, 28), c(35, 33, 31)),
                Hm=list(c(1.3, 8), c(1.3, 5, 8)), Ht=c(27, 30))
plot(tpr)
# define 2 trees with only dbh and inventory indicator (form)
tpr <- tprTrees(spp=c(1,3), Dm=c(30, 35), Hm=c(1.3, 1.3), Ht=c(27, 30), inv=4)
plot(tpr)

Run the code above in your browser using DataLab