Description Usage Arguments Details Value Author(s) References See Also Examples
Easiest and most efficient way to access FIA Data in R. Downloads FIA Data from the FIA Datamart, loads the data into R environment, and optionally saves all downloaded tables as .csv files to local directory. Capable of merging multiple state downloads of the FIA database for regional analysis. Requires an internet connection to access and download tables from the FIA Datamart.
1 2 |
states |
character; state/ US territory abbreviations (e.g. 'AL', 'MI', etc.) indicating which state subsets to download. Choose to download multiple states by passing character vector of state abbreviations (e.g. |
dir |
character (optional); directory where FIA tables will be saved after download. If NULL, tables will not be saved on disk and only loaded into R environment. |
common |
logical; if TRUE, only import most commonly used tables, including all required for |
tables |
character vector (optional); names of specific tables to be downloaded for each state specified (e.g. 'PLOT', 'TREE', 'COND', 'TREE_GRM_COMPONENT'). |
load |
logical; should downloaded data be loaded into R immediately? If all data is too large to fit in memory, use |
nCores |
numeric; number of cores to use for parallel implementation. Check available cores using |
If common = TRUE
, the following tables will be loaded: COND, COND_DWM_CALC, INVASIVE_SUBPLOT_SPP, PLOT, POP_ESTN_UNIT, POP_EVAL, POP_EVAL_GRP, POP_EVAL_TYP, POP_PLOT_STRATUM_ASSGN, POP_STRATUM, SUBPLOT, TREE, TREE_GRM_COMPONENT. These tables currently support all functionality with rFIA
, and it is recommended that only these tables be imported to conserve RAM and reduce processing time.
If you wish to merge multiple state downloads of FIA data (e.g. Michigan and Indiana state downloads), simply specify multiple state abbreviations to the states
argument. Upon import, corresponding tables (e.g. MI_PLOT and IN_PLOT) will be merged, and analysis can be completed for the entire region or within spatial units which transcend state boundaries (e.g. Ecoregion subsections).
If you choose to save downloaded tables to a local directory after download (simply specify dir
), these tables can be easily reloaded into R using readFIA
(do not need to redownload files).
Easy, efficient parallelization is implemented with the parallel
package. Users must only specify the nCores
argument with a value greater than 1 in order to implement parallel processing on their machines. Parallel implementation is achieved using a snow type cluster on any Windows OS, and with multicore forking on any Unix OS (Linux, Mac). Implementing parallel processing may substantially decrease decrease free memory during processing, particularly on Windows OS. Thus, users should be cautious when running in parallel, and consider implementing serial processing for this task if computational resources are limited (nCores = 1
).
List object containing FIA Datatables. List elements represent individual FIA Datatables stored as data.frame
objects.
If multiple subsets of the FIA database are downloaded (e.g. states = c('MI', 'IN')
), corresponding tables will be merged (e.g. PLOT table returned contains plots in both Michigan and Indiana).
Hunter Stanke and Andrew Finley
FIA DataMart: https://apps.fs.usda.gov/fia/datamart/datamart.html
FIA Database User Guide: https://www.fia.fs.fed.us/library/database-documentation/
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.