CCF.Larger: Crown Competition in Larger Trees

View source: R/CCFL.R

CCF.LargerR Documentation

Crown Competition in Larger Trees

Description

This function requires that your data.frame be sorted as detailed in examples before running.

This function calculates the cumulative Crown Competition Factor of larger trees within a plot. This function must be run with the same sorting function as the BA.Larger function. Please refer to details for explanation of required inputs, as this function will not run without properly sorting your inventory as demonstrated in the details and/or examples.

Usage

CCF.Larger(ID, SPP, DBH, EXPF, CUTOFF = TRUE)

Arguments

SPP

Species for each tree

DBH

Diameter at breast height in cm.

EXPF

Expansion Factor for each tree. Can be calculated with the EXP.F function.

CUTOFF

The minimum diameter in cm of a tree to be included in the analysis. If left blank the default CUTOFF is 10cm.

Unique.ID

Unique Plot ID defined by the Unique.ID function

Details

This function calculates the crown competition factor in larger trees. By default, this function will only include trees with a DBH > 10 in the analysis. This value can be increased or decreased by adding a cutoff value.

This function requires that your data.frame be sorted as such prior to running:

df <- df %>% group_by(ID) %>% arrange(desc(DBH), .by_group = TRUE)

Your data should include unique IDs specific to each plot. If you have not done this, it can be done using the Unique.ID function included in this package. Each tree must have an expansion factor value. This can be done using the EXP.F function.

Value

The function returns CCF values of larger trees for each tree in a plot as a numeric vector of length n.

See Also

Unique.ID

EXP.F

BA.Larger.Trees

Other Values in Larger Trees: BA.Larger.Trees()

Other Plot Level Functions: BA.Larger.Trees(), BAPH(), CrownCompF(), DBHFuns(), HeightPredict(), RD(), SDI.Max(), SDI.Plot(), TPH(), TallestTrees(), Unique.ID()

Other Crown Functions: CrownCompF(), LCW(), MCW()

Examples


ID <- c(1,1,1,1,1)
SPP <- c("BF", "RO", "RM", "BF", "RO")
DBH <- c(25, 30, 8, 19, 32)
EXPF <- c(8, 8, 8, 8, 8)
CCF.Larger(ID, SPP, DBH, EXPF, CUTOFF = TRUE)
CCF.Larger(ID, SPP, DBH, EXPF, CUTOFF = 5)

## Not run: 
df <- df %>%
   dplyr::group_by(ID) %>%
   dplyr::arrange(desc(DBH), .by_group = TRUE)

df <- df %>%
   dplyr::mutate(
   CCFL = CCF.Larger(ID, SPP, DBH, EXPF)
 )

## End(Not run)


ryanmismith/inventoryfunctions documentation built on Aug. 5, 2022, 2:22 a.m.