recruitment_ctfs {fgeo.analyze}R Documentation

Recruitment, mortality, and growth.

Description

These functions are adapted from the CTFS-R package. Compared to the original functions, these ones have a similar interface but use more conservative defaults and allow suppressing messages. These functions also feature formal tests, bug fixes, additional assertions, and improved messages.

Usage

recruitment_ctfs(
  census1,
  census2,
  mindbh = NULL,
  alivecode = NULL,
  split1 = NULL,
  split2 = NULL,
  quiet = FALSE
)

mortality_ctfs(
  census1,
  census2,
  alivecode = NULL,
  split1 = NULL,
  split2 = NULL,
  quiet = FALSE
)

growth_ctfs(
  census1,
  census2,
  rounddown = FALSE,
  method = "I",
  stdev = FALSE,
  dbhunit = "mm",
  mindbh = NULL,
  growthcol = "dbh",
  err.limit = 1000,
  maxgrow = 1000,
  split1 = NULL,
  split2 = NULL,
  quiet = FALSE
)

Arguments

census1, census2

Two census tables, each being a ForestGEO-like tree table (dataframe). A stem table won't fail, but you should use a tree table because demography analyses make more sense at the scale of trees than at the scale of stems.

mindbh

The minimum diameter above which the counts are done. Trees smaller than mindbh are excluded. By default all living trees of any size are included.

alivecode

Character; valid values of status indicating that a tree is alive. The default, 'A', is the standard CTFS designation for living trees or stems.

split1, split2

Optional vector(s) to aggregate results by. Each vector should be a column of either census1 or census2. The default aggregates the result across the entire census datasets.

quiet

Use TRUE to suppress messages.

rounddown

If TRUE, all dbh < 55 are rounded down to the nearest multiple of 5.

method

Either "I" or "E":

  • Use "I" to calculate annual dbh increment as (dbh2 - dbh1)/time

  • Use "E" to calculate the relative growth rate as (log(dbh2) - log(dbh1)) / time

stdev

Logical:

  • FALSE returns confidence limits.

  • TRUE returns the SD in growth rate per group.

dbhunit

"cm" or "mm".

growthcol

Either "dbh" or "agb" to define how growth is measured.

err.limit, maxgrow

A number. Numbers such as 10000 are high and will return all measures.

Details

Survivors are all individuals alive in both censuses, with status == A in the first census, and a diameter greater than mindbh in the first census. The total population in the second census includes all those alive plus any other survivors. Individuals whose status is NA in either census are deleted from all calculations.

Value

Metrics of recruitment: Similar to metrics of mortality.

Metrics of mortality:

Metrics of growth:

Author(s)

Richard Condit, Suzanne Lao.

Examples

assert_is_installed("fgeo.x")

census1 <- fgeo.x::tree5
census2 <- fgeo.x::tree6

as_tibble(
  recruitment_ctfs(census1, census2)
)

# Use `interaction(...)` to aggregate by any number of grouping variables
sp_quadrat <- interaction(census1$sp, census1$quadrat)

recruitment <- recruitment_ctfs(
  census1, census2,
  split1 = sp_quadrat,
  quiet = TRUE
)
as_tibble(recruitment)

mortality <- mortality_ctfs(
  census1, census2,
  split1 = sp_quadrat, quiet = TRUE
)
as_tibble(mortality)

growth <- growth_ctfs(census1, census2, split1 = sp_quadrat, quiet = TRUE)
as_tibble(growth)

# Easy way to separate grouping variables
tidyr_is_installed <- requireNamespace("tidyr", quietly = TRUE)
if (tidyr_is_installed) {
  library(tidyr)

  as_tibble(growth) %>%
    separate(groups, into = c("sp", "quadrat"))
}

[Package fgeo.analyze version 1.1.14 Index]