RvegToJuice: RvegToJuice: Export an Rveg Database to JUICE compatible...

View source: R/RvegToJuice.R

RvegToJuiceR Documentation

RvegToJuice: Export an Rveg Database to JUICE compatible format

Description

Exports an existing Rveg database into a format directly compatible with JUICE, a comprehensive software for vegetation classification. This function processes both the species composition data and the header data, formatting them to meet JUICE's import requirements.

Usage

RvegToJuice(database, export = "export", checklist = "default")

Arguments

database

Character. The path and name of an existing Rveg database to be exported (e.g., "path/to/my_db").

export

Character. The output path and name where the resulting JUICE-compatible files will be saved. Defaults to a temporary directory.

checklist

Character. The species checklist to use. By default, the function attempts to read the checklist specified in the database's metadata. You can override this by providing a custom file path or a built-in dictionary string.

Details

To ensure seamless compatibility with JUICE, this function performs several background transformations:

  • Layer Mapping: Rveg layers are automatically converted to JUICE's numeric layer representations (e.g., Tree layer "3" becomes "2", Shrub "2" becomes "4", Herb "1" becomes "6", etc.).

  • Absence Encoding: Zero values (0) are converted to ..

  • Encoding: Files are written using ISO-8859-15 encoding, which is the standard expected by JUICE for proper character rendering.

For JUICE import first import relevé data as Spreadsheet file and follow with Header data as tab-delimited file.

Value

Writes two text-based CSV files to the location specified by export: one containing the header data (⁠*H.csv⁠) and one containing the relevé species data formatted with JUICE headers (⁠*R.csv⁠).

Examples

# Example: Exporting the built-in example Rveg database to JUICE format
RvegToJuice(
  database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
)


Rveg documentation built on June 21, 2026, 9:07 a.m.