# BDATDMRHX: Calculate diameter in height Hx over bark. In rBDAT: Implementation of BDAT Tree Taper Fortran Functions

 BDATDMRHX R Documentation

## Calculate diameter in height Hx over bark.

### Description

Function to call BDAT Fortran subroutine to calculate diameter over bark in height Hx for specified tree/s.

### Usage

``````BDATDMRHX(BDATArtNr, D1, H1, D2, H2, H, Hx)
``````

### Arguments

 `BDATArtNr` numeric vector of species code; see `getSpeciesCode`. `D1` first measured diameter of tree [cm], e.g. diameter in breast height. `H1` measurement height of `D1` [m] `D2` second measured diameter of tree, see `buildTree` for details on how to specify different taper forms `H2` measurement height of D2, see `buildTree` for details on how to specify different taper forms `H` total tree height [m] `Hx` height in tree for which diameter over bark is required

### Details

conventional function interface for Fortran function BDATDMRHX. See `getDiameter` for more details.

### Value

vector of diameters over bark

`BDATDORHX` for BDAT routine calculating diameter under bark and `getDiameter` for a function with a more convenient english name, more options and including a bark switch.

### Examples

``````# simple call of function, with all parameters
BDATDMRHX(1, 30, 1.3, 0, 0, 25, Hx = 1.3)
# same with variables
BDATArtNr <- 1
D1 <- 30
H1 <- 1.3
D2 <- 0
H2 <- 0
H <- 25
Hx <- 1.3
BDATDMRHX(BDATArtNr = BDATArtNr, D1 = D1, H1 = H1, D2 = D2, H2 = H2, H = H, Hx = Hx)
## calling with a subset of tree characteristics
## german species names, abbreviated
BDATDMRHX(getSpeciesCode(c("Fi", "Bu")), 30, 0, 0, 0, H = 25, Hx = 1.3)
## english species names abbreviated
BDATDMRHX(getSpeciesCode(c("NS", "BE")), 30, 0, 0, 0, H = 25, Hx = 1.3)
``````

rBDAT documentation built on May 29, 2024, 3:08 a.m.