add_status_tree: Add column 'status_tree' based on the status of all stems of...

View source: R/add_status_tree.R

add_status_treeR Documentation

Add column status_tree based on the status of all stems of each tree.

Description

Add column status_tree based on the status of all stems of each tree.

Usage

add_status_tree(data, status_a = "A", status_d = "D")

Arguments

data

A ForestGEO-like dataframe: A ViewFullTable, tree or stem table.

status_a, status_d

Sting to match alive and dead stems; it corresponds to the values of the variable status (in census tables) or Status (with capital "S" in ViewFull tables).

Value

The input data set with the additional variable status_tree.

See Also

Other functions to add columns to dataframes: add_subquad(), add_var()

Other functions for ForestGEO data: add_subquad(), add_var()

Other functions for fgeo census: add_var(), guess_plotdim(), pick_drop

Other functions for fgeo vft: add_subquad(), add_var(), guess_plotdim(), pick_drop

Examples

# styler: off
stem <- tribble(
  ~CensusID, ~treeID, ~stemID, ~status,
          1,       1,       1,     "A",
          1,       1,       2,     "D",

          1,       2,       3,     "D",
          1,       2,       4,     "D",



          2,       1,       1,     "A",
          2,       1,       2,     "G",

          2,       2,       3,     "D",
          2,       2,       4,     "G"
)
# styler: on

add_status_tree(stem)


fgeo.tool documentation built on Sept. 3, 2022, 5:05 p.m.