Extract plot counts by inventory year and state.

datPlotcnt(
  plt,
  yrtype = "INVYR",
  states = NULL,
  designcd = FALSE,
  forsamp = TRUE,
  total = TRUE,
  subtotal = TRUE,
  savedata = FALSE,
  outfolder = NULL,
  outfn = NULL,
  gui = FALSE
)

Arguments

plt

Data frame. Table of plot-level variables to count plots. If using this table, it must include INVYR.

yrtype

String. Type of year to categorize data ("INVYR", "MEASYEAR").

states

String vector. The states in plt table.

designcd

Logical. If TRUE, includes FIA design codes in the table.

forsamp

Logical. If TRUE, includes forest/nonforest/nonsampled codes in the table.

total

Logical. If TRUE, a row is added to bottom of table with a total for the whole table.

subtotal

Logical. If TRUE, a row is added to bottom of each section for subtotals.

savedata

Logical. If TRUE, saves data to outfolder as comma-delimited file (*.csv). No objects are returned. If FALSE, the data are saved as R objects and returned to user. See details for caveats.

outfolder

String. The output folder path. If NULL and savedata=TRUE or parameters=TRUE, outfolder is the working directory.

outfn

String. The name of the output file. If NULL, defaults to pltcnt_'date'.csv

gui

Logical. If TRUE, gui windows pop up for parameter selection.

Value

pltcnt - a dataframe of counts (YEAR, STABBR, STCD, PLOTS, NONSAMPLED, FOREST, NONFOREST)

Author

Tracey S. Frescino