getHeight | R Documentation |
this function calculates the height of a given diameter inside or outside bark for a given tree
getHeight(tree, ...)
## S3 method for class 'data.frame'
getHeight(tree, Dx = NULL, bark = TRUE, mapping = NULL, ...)
## S3 method for class 'list'
getHeight(tree, Dx = NULL, bark = TRUE, mapping = NULL, ...)
## S3 method for class 'datBDAT'
getHeight(tree, Dx = NULL, bark = TRUE, mapping = NULL, ...)
tree |
either a data.frame or a list containing the variables needed to
decribe a tree, i.e. spp, D1, H, and optionally H1, D2, H2. See
|
... |
passing arguments to methods. |
Dx |
diameter of tree for which height is required; defaults to NULL |
bark |
logical, if TRUE given diameter |
mapping |
mapping of variable names in case a data.frame is given into
parameter |
see buildTree
for how to specify a tree object
a matrix with one row for each tree and one column for each Dx
given, holding the height of provided diameter Dx
inside stem taper.
The matrix is simplified by [,,drop=TRUE]
, especially if
Dx=NULL
.
getHeight(data.frame)
: transforming data.frame
before calling
getHeight
using buildTree
getHeight(list)
: transforming list
before calling
getHeight
using buildTree
getHeight(datBDAT)
: class method for class datBDAT
tree <- data.frame(spp = c(1, 1), D1 = c(30, 25), H = c(25, 20), Dx = c(7, 7))
getHeight(tree, bark = TRUE)
getHeight(tree, bark = FALSE)
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 20), Dx = c(7, 7))
getHeight(tree, bark = TRUE, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 25), h = c(25, 20))
Dx <- c(7, 5)
getHeight(tree, Dx = Dx, bark = TRUE, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
tree <- data.frame(spp = c(1, 1), D1 = c(30, 25), H = c(25, 20), Dx = c(7, 7))
getHeight(tree, Dx = c(1:5), bark = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.