# NOT RUN {
## Load data from the rFIA package
data(fiaRI)
data(countiesRI)
## Most recents subset
fiaRI_mr <- clipFIA(fiaRI)
## Most recent estimates for growing-stock on timber land by species
biomass(db = fiaRI_mr,
landType = 'timber',
treeType = 'gs')
# }
# NOT RUN {
## Estimates for live white pine ( > 12" DBH) on forested mesic sites (all available inventories)
biomass(fiaRI_mr,
treeType = 'live',
treeDomain = SPCD == 129 & DIA > 12, # Species code for white pine
areaDomain = PHYSCLCD %in% 21:29) # Mesic Physiographic classes
## Most recent estimates grouped by stand age on forest land
# Make a categorical variable which represents stand age (grouped by 10 yr intervals)
fiaRI_mr$COND$STAND_AGE <- makeClasses(fiaRI_mr$COND$STDAGE, interval = 10)
biomass(db = fiaRI_mr,
grpBy = STAND_AGE)
## Estimates for snags greater than 20 in DBH on forestland for all
## available inventories (time-series)
biomass(db = fiaRI,
landType = 'forest',
treeType = 'dead',
treeDomain = DIA > 20)
## Most recent estimates for live stems on forest land by species
biomass(db = fiaRI_mr,
landType = 'forest',
treeType = 'live',
bySpecies = TRUE)
## Same as above, but implemented in parallel (much quicker)
parallel::detectCores(logical = FALSE) # 4 cores available, we will take 2
biomass(db = fiaRI_mr,
landType = 'forest',
treeType = 'live',
bySpecies = TRUE,
nCores = 2)
## Most recent estimates for all stems on forest land grouped by user-defined areal units
ctSF <- biomass(fiaRI_mr,
polys = countiesRI,
returnSpatial = TRUE)
plot(ctSF) # Plot multiple variables simultaneously
plotFIA(ctSF, BIO_AG_ACRE) # Plot of aboveground biomass per acre
# }
Run the code above in your browser using DataLab