| RvegMerge | R Documentation |
Combines two separate Rveg databases into a single, unified database.
This function cleanly merges both the species composition data (REL) and the
environmental plot header data (HEAD), and seamlessly combines their metadata.
RvegMerge(database_1, database_2, export = "export")
database_1 |
Character. The path and name of the first |
database_2 |
Character. The path and name of the second |
export |
Character. The output path and name where the merged database files
( |
During the merge process:
Relevé Re-indexing: The relevé columns from both databases are sequentially re-indexed (e.g., X1, X2, ..., Xn) to prevent column name collisions.
Checklist Validation: The function checks the metadata of both databases to ensure they were built using the same species checklist. If the checklists differ, it will issue a warning, though the merge will still proceed.
Missing Species: If a species exists in one database but not the other, the function automatically fills the absences with 0.
Metadata: The total number of relevés is updated, and any custom species (extra_spec) from both databases are concatenated together.
Writes two linked CSV files to the location specified by export, representing
the combined Rveg database.
RvegCombine for manipulating data within a single database, addReleve for adding individual relevés.
# Example: Merging the built-in database with itself
db_path <- file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
RvegMerge(
database_1 = db_path,
database_2 = db_path
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.