rm(list = ls())
library(RSFIA)
orig_dir <- getwd()
fia_dir <- 'C:/Users/Brandon/Documents/docs/PHD/FIA/data'
data_dir <- "C:/Users/Brandon/Documents/docs/R_workspace/RSFIA/inst/extdata"
data("FIA_mortality_with_explanatory")
mort_df <- FIA_mortality_with_explanatory
colnames(mort_df)[which(colnames(mort_df) == 'PLT_CN')] <- 'CN'
trees <- RSFIA::ImportTrees(plots = mort_df, dir = fia_dir)
colnames(mort_df)[which(colnames(mort_df) == 'CN')] <- 'PLT_CN'


tree_counts <- RSFIA::CountTrees(trees = trees, PLT_CNs = mort_df$PLT_CN,
                          use_metric = T)

FIA_tree_counts <- tree_counts
#use_data(FIA_tree_counts, overwrite = T)


bmcnellis/RSFIA documentation built on June 1, 2019, 7:40 a.m.