Learn R Programming

Rveg (version 0.1.8)

RvegCombine: RvegCombine: Merge Species or Vegetation Layers in an Rveg Database

Description

An interactive utility that allows users to merge the abundance covers of specific species or entire vegetation layers within an existing Rveg database.

Usage

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

Value

Writes two linked CSV files to the location specified by export, representing the modified Rveg database.

Arguments

database

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

export

Character. The output path and name where the modified database files (*HEAD.csv and *REL.csv) will be saved. Defaults to a temporary directory.

checklist

Character. The species checklist to be used. By default, it uses the checklist defined in the database's metadata.

Details

RvegCombine() operates via a console menu with two primary modes:

  • Layer Merging (LAYER): Moves all species recorded in one specific layer (e.g., shrub layer 2) into another layer (e.g., tree layer 3).

  • Species Merging (SPEC): Merges the records of one specific taxon into another across the entire database, which is highly useful for resolving taxonomic aggregates or correcting identification errors after data entry.

Mathematical Consolidation: #' When merging entities that both have non-zero percentage covers in the same relevé, the function does not simply add them together (which could exceed 100%). Instead, it uses a probabilistic sum formula to estimate the combined cover: $$Combined = C_1 + C_2 \times (1 - \frac{C_1}{100})$$

See Also

addReleve for data entry, RvegMerge for merging entire databases.

Examples

Run this code
if (interactive()) {
  RvegCombine(
    database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
  )
}

Run the code above in your browser using DataLab