RvegToJuice: 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.
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).
Arguments
database
Character. The path and name of an existing Rveg database
to be exported (e.g., "path/to/my_db").
export
name of your exported csv file
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 delimineted file.
# Example: Exporting the built-in example Rveg database to JUICE formatRvegToJuice(
database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
)