Package 'dyntaper'

Title: Dynamic Stem Profile Models, AKA Tree Taper Equations
Description: Performs calculations with tree taper (or stem profile) equations, including model fitting. The package implements the methods from García, O. (2015) "Dynamic modelling of tree form" <http://mcfns.net/index.php/Journal/article/view/MCFNS7.1_2>. The models are parsimonious, describe well the tree bole shape over its full length, and are consistent with wood formation mechanisms through time.
Authors: Oscar Garcia [cre, aut]
Maintainer: Oscar Garcia <[email protected]>
License: MIT + file LICENSE
Version: 1.1
Built: 2024-10-31 22:08:32 UTC
Source: https://github.com/ogarciav/dyntaper

Help Index


Small taper dataset from Brink and von Gadow (1986).

Description

Taper measurements on 10 Eucalyptus cloeziana trees.

Usage

brink

Format

A data frame with 108 rows and 5 variables:

Tree

tree identification number (factor)

h

height level, meters

dib

diameter inside bark, centimeters

Dob

dbh outside bark, cm (breast height is 1.35 m)

H

total height, meters

Source

Brink, C. and von Gadow, K. (1986) "On the use of growth and decay functions for modelling stem profiles". EDV in Medizin und Biologi 17, 20-27


Decay function delta

Description

Calculates (1px)+1/p(1 - p*x)_+^{1/p}, or its limit exp(x)exp(-x) when pp tends to 0.

Usage

decay(x, p)

Arguments

x

Input value(s), possibly a vector.

p

Parameter.

Details

Perhaps overkill, but uses log1p() function for better accuracy than the more obvious formula.

Value

Decay function value(s).

Examples

decay(2, 0) == exp(-2)
   decay(1.5, 0.5)
   decay(2.5, 0.5)
   decay(2.5, -0.5)
   for(p in seq(1, -1, -0.5)) curve(decay(x, p), 0, 3, add=(p != 1))

Height level for given diameter or area.

Description

Find the height level at which the tree reaches a given diameter (if area == FALSE, default) or a given cross-sectional area (if area == TRUE). That is, the inverse of taper(), except that a vector argument is not allowed.

Usage

hlevel(ds, H, D, b, bh, area = FALSE)

Arguments

ds

The given diameter or area.

H

Tree total height.

D

Tree diameter at breast height.

b

Vector with the 5 parameters.

bh

Breast height. Typically 1.2, 1.3 or 1.4 m, or 4.5 ft.

area

If TRUE, 'ds' is a cross-sectional area, otherwise a diameter. Default is FALSE.

Value

Height level corresponding to 'ds' if any, otherwise NA.

Examples

b <- c(2.569, 0, 1.042, 0.3012, -1)  # parameters
   Dib <- 0.956 * 24  # convert dbh outside bark to inside bark 
   hlevel(15, 32, Dib, b, 1.3)  # height where the diameter is 15
   hlevel(24, 32, Dib, b, 1.3)  # breast height
   hlevel(35, 32, Dib, b, 1.3)  # height where the diameter is 35

Integral of decay function.

Description

Integral of decay function.

Usage

Id(x, p)

Arguments

x

Input value(s), possibly a vector.

p

Parameter.

Value

Integral of the decay function between 0 and x.

Examples

Id(2, 0)
   Id(1.5,0.5)
   Id(2.5, 0.5)
   Id(2.5, -0.5)
   for(p in seq(1, -1, -0.5)) curve(Id(x, p), 0, 3, add=(p != 1))

Double integral of decay function.

Description

Double integral of decay function.

Usage

Idd(x, p)

Arguments

x

Input value(s), possibly a vector.

p

Parameter.

Value

Iterated integral of the decay function between 0 and x, that is, the integral of Id(x, p).

Examples

Idd(2, 0)
   Idd(1.5,0.5)
   Idd(2.5, -1)
   Idd(2.5, -0.5)
   for(p in seq(1, -1, -0.5)) curve(Idd(x, p), 0, 3, add=(p != 1))

Tree taper (or profile) equation.

Description

Returns the diameter or cross-sectional area at one or more hight levels.

Usage

taper(h, H, D, b, bh, area = FALSE)

Arguments

h

Height level(s), possibly a vector.

H

Tree total height.

D

Tree diameter at breast height (dbh).

b

Vector with the 5 parameters.

bh

Breast height. Typically 1.2, 1.3 or 1.4 m, or 4.5 ft.

area

If TRUE, returns cross-sectional areas, otherwise returns diameters. Default is FALSE.

Value

Diameter(s) at level(s) 'h' if 'area' is FALSE, otherwise cross-sectional area(s).

Note

Diameters or areas are either all outside bark, or all inside bark. A dbh outside bark can be used with an inside-bark taper equation through a substitution D -> k * D, where k is an outside to inside bark conversion factor.

Examples

curve(taper(x, 32, 0.956*24, c(2.569, 0, 1.042, 0.3012, -1), 1.3), 0, 32)

Unscaled base taper curve of cross-sectional area vs height level.

Description

Unscaled base taper curve of cross-sectional area vs height level.

Usage

tbase(h, H, b)

Arguments

h

Height level(s), possibly a vector.

H

Tree total height.

b

Vector with the 5 parameters.

Value

Value(s) proportional to the area(s) at the level(s) h.

Examples

tbase(16, 32, c(2.569, 0, 1.042, 0.3012, -1))

Volume between two height levels.

Description

Volume between two height levels.

Usage

volume(h1, h2, H, D, b, bh, rhd)

Arguments

h1, h2

The two height levels.

H

Tree total height.

D

Tree diameter at breast height.

b

Vector with the 5 parameters.

bh

Breast height. Typically 1.2, 1.3 or 1.4 m, or 4.5 ft.

rhd

Ratio between the height and diameter units. E.g., 100 for m and cm, or 12 for feet and inches.

Value

Volume between h1 and h2.

Examples

b <- c(2.569, 0, 1.042, 0.3012, -1)  # parameters
   Dib <- 0.956 * 24  # convert dbh outside bark to inside bark 
   volume(0, 32, 32, Dib, b, 1.3, 100)  # total volume
   h15 <- hlevel(15, 32, Dib, b, 1.3)  # height for diameter 15
   volume(0.3, h15, 32, Dib, b, 1.3, 100)  # volume between stump and h15