getDiameter | R Documentation |
this function calculates the diameter inside or outside bark of in given height for a given tree
getDiameter(tree, ...)
## S3 method for class 'data.frame'
getDiameter(tree, Hx = NULL, bark = TRUE, mapping = NULL, ...)
## S3 method for class 'list'
getDiameter(tree, Hx = NULL, bark = TRUE, mapping = NULL, ...)
## S3 method for class 'datBDAT'
getDiameter(tree, Hx = NULL, bark = TRUE, mapping = NULL, ...)
tree |
either a data.frame, a list or an object of class |
... |
passing arguments to methods. |
Hx |
height in tree for which diameter over or under bark is required; defaults to NULL |
bark |
logical, if TRUE returned diameter |
mapping |
mapping of variable names in case a data.frame is given into
parameter |
if tree does not includes variable Hx, a full outer join is generated between both
a matrix with one row for each tree and one column for each Hx
given, holding the diameter over or under bark of provided height Hx
inside stem taper. The matrix is simplified by [,,drop=TRUE]
,
especially if Hx=NULL
.
getDiameter(data.frame)
: transforming data.frame
before calling
getDiameter
using buildTree
getDiameter(list)
: transforming list
before calling
getDiameter
using buildTree
getDiameter(datBDAT)
: class method for class datBDAT
tree <- data.frame(spp = c(1, 1), D1 = c(30, 30), H = c(25, 25), Hx = c(1.3, 22.248))
getDiameter(tree, bark = TRUE)
getDiameter(tree, bark = FALSE)
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 30), h = c(25, 25), Hx = c(1.3, 22.248))
getDiameter(tree, bark = TRUE, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
tree <- data.frame(BDATCode = c(1, 1), dbh = c(30, 30), h = c(25, 25))
Hx <- c(1.3, 22.248)
getDiameter(tree, Hx = Hx, bark = TRUE, mapping = c("BDATCode" = "spp", "dbh" = "D1", "h" = "H"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.