getPlants: getPlants

getPlantsR Documentation

getPlants

Description

Retrieves plant data from an NPSForVeg object.

Usage

getPlants(
  object,
  group,
  status = "alive",
  species = NA,
  cycles = NA,
  years = NA,
  plots = NA,
  crown = NA,
  size.min = NA,
  size.max = NA,
  BA.min = NA,
  BA.max = NA,
  host.tree = NA,
  in.crown = FALSE,
  decay = NA,
  common = FALSE,
  output = "dataframe"
)

Arguments

object

Either an object of class NPSForVeg or a list of such objects

group

A required character string indicating which group of plants should be selected. Options are: "trees", "saplings", "seedlings", "shrubs" "shseedlings"(indicates shrub seedlings), "vines", "herbs", or "cwd'.

status

A required character string indicating if user wants data from living or dead plants. Used only for trees, saplings and shrubs. Values of this argument are matched to the Status field in the Tree, Saplings or Shrubs slot. Acceptable options are:

"alive"

The default. Includes any plant with a status of "Alive", "Alive Standing", "Alive Broken", "Alive Leaning" ,"Alive Fallen", "Recruit Standing", "Recruit Broken", "Recruit Leaning", "Recruit Fallen", "AB", "AF", "AL", "AM", "AS", "RB", "RF", "RL", or "RS"

"dead"

Includes any plant with a status of "Dead", "Dead Fallen", "Dead - Human Action", "Dead Leaning", "Dead Missing", "Dead Standing", "Dead - Too Small","DB","DC","DF","DL","DM","DS" or "DX"

"snag"

Standing dead tree only, Includes any plant with a status of "Dead", "Dead - Human Action", "Dead Leaning", "Dead Missing", "Dead Standing", "Dead - Too Small","DB","DL","DM",or"DS"

"other"

Includes any plant with a status of "Missing", "Missing - Presumed Dead", "Missing - Uncertain" , "Downgraded to Non-Sampled","ES","EX","NL","XO", "XP" or"XS"

"all"

Includes all plants

species

Defaults to NA. A character vector of Latin names. When included only those species are selected. This is determined by matching the appropriate Latin_Name field to species

cycles

Defaults to NA. A numeric vector indicating which cycles should be included. This is determined by matching the appropriate Cycle field to cycles

years

Defaults to NA. A numeric vector indicating which years should be included. This is determined by matching the appropriate Sample_Year field to years

plots

Defaults to NA A character vector indicating which plots should be included. This is determined by matching the appropriate Plot_Name field to plots.

crown

Defaults to NA. A character vector indicating which crown classes should be included. This is determined by matching the appropriate crown_Description field to crown. Options include "Co-dominant", "Dominant", "Edge Tree", "Intermediate", "Light Gap Exploiter","Open-grown" and "Overtopped".

size.min

Defaults to NA. A single numeric value that indicates the minimum plant size that should be included. For trees and saplings this will be interpreted as diameter in the Equiv_Live_DBH_cm field, for tree and shrub seedlings it is interpreted as height in the Height field and for herbs it is interpeted as percent cover in the Percent_Cover field. This has no effect on shrubs and vines.

size.max

Defaults to NA. A single numeric value that indicates the maximum plant size that should be included. For trees and saplings this will be interpreted as diameter in the Equiv_Live_DBH_cm field, for tree and shrub seedlings it is interpreted as height in the Height field and for herbs it is interpeted as percent cover in the Percent_Cover field. This has no effect on shrubs and vines.

BA.min

Defaults to NA. A single numeric value that indicates the minimum basal area a plant must have to be included. This is only implemented for trees and saplings, and is interpreted as basal area in the SumLiveBasalArea_cm2 field.

BA.max

Defaults to NA. A single numeric value that indicates the maximum basal area a plant must have to be included. This is only implemented for trees and saplings, and is interpreted as basal area in the SumLiveBasalArea_cm2 field.

host.tree

Defaults to NA. Only meaningful when group is "vines". A character vector containing Latin names of host trees. Only vines occuring in those hosts will be returned. Determined by matching the Host_Latin_Name in the Vines slot.

in.crown

Defaults to FALSE. Only meaningful when group is "vines". When TRUE only vines which have reached the crown of the tree are returned. Determined by checking if the Condition field in the Vines slot has the text "Vines in the crown".

decay

Defaults to NA. Only meaningful when group is "cwd". Only CWD with that decay class will be returned.

common

Defaults to FALSE. Indicates if common names should be used rather than Latin names. Common names are determined using the getCommons function.

output

Either "dataframe" or "list". Determines the output type When object is a list. "Dataframe", the default, indicates the output from all of NSPForVeg objects should be combined into a single data.frame. "List" will return a list where each element of the list is a data.frame from a single NPSForVeg object, and each element is named based on that objects ParkCode slot.

Details

This function extracts data on plants from an NPSForVeg object. This function is called by other analysis and graphing functions. getPlants has a variety of arguments that narrow the response down to plants that match critera such as Latin name, size, crown class etc.


NCRN/NPSForVeg documentation built on March 26, 2024, 7:13 a.m.