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

character or data.frame. URL/path to a compressed SNFI file (.zip) having data of either .dbf or .mdb file extensions; or data frame such as that produced by nfiMetrics; or data frame such as that produced by readNFI.

summ.vr

character or NULL. Name of a Categorical variables in the SNFI data used to summarize the outputs. If NULL then output from metrics2Vol is returned. Default 'Estadillo' processes sample plots.

cut.dt

character. Logical condition used to subset the output. Default 'd == d' avoids subsetting.

report

logical. Print a report of the output in the current working directory.

...

Additional arguments in metrics2Vol or nfiMetrics or readNFI.

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')



[Package basifoR version 0.4 Index]