TvToRveg: TvToRveg: Import Turboveg Data into an Rveg Database

View source: R/RvegToJuice.R

TvToRvegR Documentation

TvToRveg: Import Turboveg Data into an Rveg Database

Description

Converts a Turboveg export file into a fully functional Rveg database. The function parses plot headers, standardizes species nomenclature against a specified checklist, and maps vegetation layers.

Usage

TvToRveg(tv, export = "export", checklist = "default", Rveglayers = TRUE)

Arguments

tv

Character. The file path to the Turboveg export file (.csv or .xml).

export

Character. The output path and name of the new Rveg database Defaults to a temporary directory.

checklist

Character. The species checklist used to match Turboveg full names to Rveg's 7-character ShortName codes. Defaults to "default". Select one you want to use in your Rveg database or the one most similar to the one used in Turboveg.

Rveglayers

Logical. If TRUE (the default), Turboveg layer codes (e.g., 't', 's', 'h', 'm', 'j') are automatically translated into standard Rveg numeric/character layers (3, 2, 1, 0, J).

Details

This function natively supports both .csv and .xml Turboveg export formats. In Turboveg, either selecet ⁠Standard XML file⁠ or ⁠Spreadsheet table⁠. In the case of spreadsheet table, select format 'semicolon delimited and requested header data.

During the import process, the function operates interactively:

  • Species Resolution: If a species in the Turboveg file cannot be automatically matched to the provided checklist, the function will pause and prompt the user to manually resolve the unknown species using a search interface.

  • Scale Selection: The user will be prompted to specify whether the imported abundance data uses percentages ("P") or the Braun-Blanquet scale ("BB").

Value

Writes two linked CSV files (⁠*REL.csv⁠ and ⁠*HEAD.csv⁠ = ⁠Rveg database⁠) to the location specified by export.

Examples

if (interactive()) {
  # Example: Importing a Turboveg CSV export (or use tvexport.xml)
  TvToRveg(
    tv = file.path(path.package("Rveg"), "extdata/ExampleDB", "tvexport.csv"),
    Rveglayers = TRUE
  )
}


Rveg documentation built on March 1, 2026, 5:06 p.m.