summary_nfi {knfi}R Documentation

Calculate descriptive statistics for National Forest Inventory Data

Description

summary_nfi() is a function that calculates comprehensive descriptive statistics for National Forest Inventory (NFI) data. It can provide summaries for individual plots, the entire study area, or specific groups within the study area using parameters byplot or plotgrp. Users have flexibility in specifying data inclusion criteria and analysis levels using parameters clusterplot, largetreearea, stockedland, and talltree. These parameters determine whether to treat cluster plots as single plots, to include large tree survey plots, and to focus only on Stocked land and tall trees.

Usage

summary_nfi(
  data,
  byplot = FALSE,
  plotgrp = NULL,
  continuousplot = FALSE,
  clusterplot = FALSE,
  largetreearea = TRUE,
  stockedland = TRUE,
  talltree = TRUE
)

Arguments

data

: A list containing 'plot' and 'tree' data frames, typically generated by read_nfi.

byplot

: A logical flag (default FALSE); if TRUE, calculates statistics for each plot separately. If FALSE, calculates for the entire dataset.

plotgrp

: A character vector; specifies variables from 'plot' table to use for grouping. Use c() to combine multiple variables.

continuousplot

: A logical flag (default TRUE); if TRUE, includes only plots that have been continuously measured in all NFI cycles (5th, 6th, etc.). If FALSE, includes plots regardless of missing cycle measurements.

clusterplot

: A logical flag (default FALSE); if TRUE, treats each cluster plot as a single unit. If FALSE, calculates for each subplot separately.

largetreearea

: A logical flag (default TRUE); if TRUE, includes large tree survey plots in the analysis. If FALSE, only uses standard tree plots.

stockedland

: A logical flag (default TRUE); if TRUE, includes only stocked land. If FALSE, includes all land types.

talltree

: A logical flag (default TRUE); if TRUE, includes only tall trees. If FALSE, includes both trees and shrubs.

Details

The function calculates the following statistics: Plot-related statistics:

Tree-related statistics:

Tree measurements and stand statistics (mean and standard deviation):

The largetreearea parameter affects calculations differently:

Value

A data.frame that includes summary statistics. The structure depends on the input parameters:

Examples


data("nfi_donghae")

# Basic usage
summary_stats <- summary_nfi(nfi_donghae, continuousplot = TRUE)

# Summarize by the group, including all land types
grouped_stats <- summary_nfi(nfi_donghae, plotgrp = "OWN_CD", 
                              stockedland = FALSE, continuousplot = TRUE)

# Summarize by individual plots, including both trees and shrubs 
plot_summaries <- summary_nfi(nfi_donghae, byplot = TRUE, talltree = FALSE)


[Package knfi version 1.0.1 Index]