getNFI: Read raw SNFI tables (deprecated; use 'readNFI()')

getNFIR Documentation

Read raw SNFI tables (deprecated; use readNFI())

Description

Deprecated wrapper around readNFI. getNFI() is kept for backward compatibility, but it now delegates internally to readNFI() and returns imported tables instead of acting as a file-fetching helper.

Usage

getNFI(provincia, ...)

Arguments

provincia

Input accepted by readNFI. This can be a province identifier, a local or remote .zip archive, one or more decompressed inventory file paths, or a data frame already loaded in memory.

...

Additional arguments passed to readNFI.

Details

Deprecated. Use readNFI in new code. This compatibility wrapper preserves the historical function name while redirecting all supported inputs to readNFI(), including province identifiers, local or remote .zip archives, direct paths to decompressed inventory files, and data frames already loaded in memory.

Because getNFI() now calls readNFI() internally, its behavior follows readNFI() semantics. In particular, the function returns imported data rather than extracted file paths. Users who still need archive extraction without import should call fetchNFI directly.

The argument names are kept for compatibility with older code,

but users should migrate to readNFI.

A deprecation warning is emitted on each call to make that transition explicit.

Value

The same return value as ⁠readNFI⁠. Depending on the input and selected files, this is typically a data frame or a named list of data frames containing imported SNFI tables.

Author(s)

Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)

Examples

## Minimal self-contained example using a temporary CSV file
tmp <- tempfile(fileext = ".csv")

utils::write.table(
    data.frame(
        plot = 1:2,
        species = c("sp1", "sp2"),
        dbh_cm = c(12.5, 18.0)
    ),
    file = tmp,
    sep = ";",
    row.names = FALSE,
    quote = FALSE
)

x <- suppressWarnings(getNFI(tmp))
str(x)

unlink(tmp)

basifoR documentation built on Aug. 26, 2026, 9:06 a.m.

Related to getNFI in basifoR...