library(rFIA)
db <- getFIA(states = c('NH','VT','ME', 'NY'), dir = 'data', common = TRUE)
fiaNE <- readFIA('data', common = FALSE, states = c('ME', 'NY','VT', 'NH'))
tpaNE <- tpa(fiaNE)
The problem occurs because some CSV files are empty. In this case, it is one of the VT files. The updated code skips over empty data.tables when loading them all to the list.
Excellent catch Marek! Thanks so much for contributing a fix - please let me know if you run into any other problems, always happy to help! Thanks again.
The following code fails:
The problem occurs because some CSV files are empty. In this case, it is one of the VT files. The updated code skips over empty data.tables when loading them all to the list.