Skip to contents

Download and unzip the inventory data files at the desired destination

Usage

download_inventory(
  inventory = c("FIA", "FFI", "IFN"),
  destination = ".",
  states = NULL,
  .verbose = TRUE
)

Arguments

inventory

Character with the inventory abbreviation

destination

Path to the inventory destination folder. This folder must exists.

states

Character vector indicating the FIA states to download. Only used if FIA is selected.

.verbose

Logical indicating if progress messages should be shown.

Value

Invisible TRUE if the download and unzip was succesful, an error otherwise.

Details

This function tries to download the available files for the especified inventory from the official repositories of the inventory. It can fail as can be connection problems or files missing temporary (This usually happens for the version 4 of the IFN)

Examples

# \donttest{
if (FALSE) { # \dontrun{
library(forestables)
download_inventory(ffi, destination = tempdir())
} # }
# }