Learn R Programming

calba (version 0.1.2)

ba_decay_long: Long-format decay table

Description

Transform the matrices returned by `ba_decay` into a tidy table that can be joined with other data or mapped with `ggplot2`.

Usage

ba_decay_long(
  mu_values,
  sp,
  gx,
  gy,
  ba,
  r,
  exponential_normal = FALSE,
  edge_correction = c("none", "safe"),
  bounds = NULL
)

Value

A data frame with `tree_id`, `species`, `mu`, `con_ba`, and `total_ba`.

Arguments

mu_values

Numeric vector of decay parameters.

sp

Character/factor species vector.

gx

Numeric x-coordinates.

gy

Numeric y-coordinates.

ba

Numeric basal area.

r

Positive radius threshold.

exponential_normal

Logical passed to `ba_decay`.

edge_correction

Character; see `ba_simple()` for the `"safe"` option.

bounds

Optional numeric vector `c(xmin, xmax, ymin, ymax)` giving the plot extent. When `NULL`, the range of `gx`/`gy` is used; supply bounds if your data do not span the full plot.