Downloads and extracts compressed comma-delimited file(s) (*.zip) from FIA DataMart (https://apps.fs.usda.gov/fia/datamart/CSV/datamart_csv.html). Only 1 table can be specified, but multiple states may be included.
Arguments
- DBtable
String. Name of table to download. Only 1 table allowed.
- states
String or numeric vector. Name (e.g., "Arizona", "New Mexico") or code (e.g., 4, 35) of states to download data. If NULL, tables that are not state-level are downloaded.
- returnDT
Logical. If TRUE, a data table is returned, else, a data frame.
- stopifnull
Logical. If TRUE, stop if table is NULL.
- noIDate
Logical. If TRUE, do not include columns with type IDate.
Value
Returns a data table (returnDT=TRUE), or data.frame (returnDT=FALSE) of downloaded table(s). If more than one state, returned as one table.