dendroMetrics {basifoR} | R Documentation |
Summarize dendrometrics
Description
This function can summarize dendrometric data of the Spanish National Forest Inventory (SNFI). It can also control most other functions of the package. Dendrometric variables in the outputs are transformed into stand units, see the Details section.
Usage
dendroMetrics(nfi, summ.vr = "Estadillo",
cut.dt = "d == d",
report = FALSE, ...)
Arguments
nfi |
|
summ.vr |
|
cut.dt |
|
report |
|
... |
Additional arguments in |
Details
Dendrometric variables are
summarized according to the levels of
the argument summ.vr
. The summary
outputs include the categorical columns
formulated in summ.vr
and the
variables defined using
arguments/defaults in
nfiMetrics
. These
variables include the tree basal area
ba
('m2 ha-1'
), the
average diameter at breast height
d
('cm'
), the quadratic
mean diameter dg
('cm'
),
the average tree height h
('m'
), the number of trees by
hectare n
('dimensionless'), and
the over bark volume v
('m3
ha-1'
). Subsets of the output summary
are extracted using logical expressions
in argument 'cut.dt'
, see syntax
in Logic
.
Value
data.frame
. Depending on summ.vr = NULL
, an output from
metrics2Vol
, or a summary of the variables, see
Details section.
Author(s)
Wilson Lara <wilarhen@gmail.com>, Cristobal Ordonez <a_cristo@pvs.uva.es>, Felipe Bravo <fbravo@pvs.uva.es>
Examples
## SNFI Data from the province of Madrid
madridNFI <- system.file("ifn3p28_tcm30-293962.zip", package="basifoR")
rmad <- readNFI(madridNFI)[1:100,]
mmad <- nfiMetrics(rmad)
vmad <- metrics2Vol(mmad)
dmad <- dendroMetrics(vmad, cut.dt = 'h > 8')
head(dmad)
## see metric units
attr(dmad,'units')
## Retrieval of SNFI data in 'www.miteco.gob.es' and computation
## of the corresponding dendrometric summary:
path <- '/es/biodiversidad/servicios/banco-datos-naturaleza/090471228013cbbd_tcm30-278511.zip'
url2 <- httr::modify_url("https://www.miteco.gob.es", path = path)
dmad <- dendroMetrics(url2, cut.dt = 'h >= 11')
head(dmad)
attr(dmad, 'units')