| Title: | Digitization of Phytosociological Relevés |
| Version: | 0.2.0 |
| Description: | Digitizes, manages, and classifies phytosociological vegetation plots. Includes a checklist of Czech vascular plants based on Danihelka, Chrtek, and Kaplan (2012) https://www.preslia.cz/article/159. Imports vegetation data from 'TURBOVEG' (Hennekens and Schaminée, 2001) <doi:10.2307/3237010> and exports data for 'JUICE' (Tichý, 2002) <doi:10.1111/j.1654-1103.2002.tb02069.x>. Supports vegetation classification using 'CzechVeg-ESy' expert rules (Chytrý et al., 2020) <doi:10.5281/zenodo.3605562> and a constancy-based classifier inspired by 'VegKey' (Tichý and Chytrý, 2019) <doi:10.1111/jvs.12799>. The bundled default classification model was trained on 'CzechVeg-OpenStrat' (Chytrý et al., 2026) <doi:10.5281/zenodo.19231152>. Resolves plant synonyms using the World Checklist of Vascular Plants (Govaerts et al., 2021) <doi:10.1038/s41597-021-00997-6>, the taxonomic backbone of 'Plants of the World Online'. For package methodology, see Král and Douda (2025) <doi:10.1111/jvs.70012>. |
| URL: | https://plant-ecology-lab-czu.com/resources/rveg/, https://github.com/sesitcsl2/Rveg |
| BugReports: | https://github.com/sesitcsl2/Rveg/issues |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| Imports: | utils, xml2 |
| Suggests: | knitr, rmarkdown |
| VignetteBuilder: | knitr |
| Config/roxygen2/version: | 8.1.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-11-24 21:49:52 UTC; premek |
| Author: | Přemysl Král |
| Maintainer: | Přemysl Král <kralp@fzp.czu.cz> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-25 08:30:40 UTC |
Rveg: Digitization of Phytosociological Relevés
Description
Simple and fast tool for transforming phytosociological vegetation data into digital form for the following analysis.
For detailed guide run vignette("Rveg","Rveg")
or check the quick start guide on https://github.com/sesitcsl2/Rveg
Author(s)
Maintainer: Přemysl Král kralp@fzp.czu.cz (ORCID)
Authors:
Přemysl Král kralp@fzp.czu.cz (ORCID)
Jan Douda douda@fzp.czu.cz (ORCID)
References
Král, P. and Douda, J. (2025). "Introducing Rveg: An R Package for Phytosociological Data Digitizing". Journal of Vegetation Science 36: e70012. doi:10.1111/jvs.70012
Danihelka, J., Chrtek, J. and Kaplan, Z. (2012). "Checklist of vascular plants of the Czech Republic". Preslia 84: 647-811. https://www.preslia.cz/article/159
Hennekens, S.M. and Schaminée, J.H.J. (2001). "TURBOVEG, a comprehensive data base management system for vegetation data". Journal of Vegetation Science 12: 589-591. doi:10.2307/3237010
Tichý, L. (2002). "JUICE, software for vegetation classification". Journal of Vegetation Science 13: 451-453. doi:10.1111/j.1654-1103.2002.tb02069.x
Chytrý, M. et al. (2020). "CzechVeg-ESy: Expert system for automatic classification of vegetation plots from the Czech Republic". Zenodo, version v1-2020-01-12. doi:10.5281/zenodo.3605562
Bruelheide, H., Tichý, L., Chytrý, M. and Jansen, F. (2021). "Implementing the formal language of the vegetation classification expert systems (ESy) in the statistical computing environment R". Applied Vegetation Science 24: e12562. doi:10.1111/avsc.12562
Tichý, L. (2005). "New similarity indices for the assignment of relevés to vegetation units of an existing phytosociological classification". Plant Ecology 179: 67-72. doi:10.1007/s11258-004-5798-8
Tichý, L. and Chytrý, M. (2019). "Probabilistic key for identifying vegetation types in the field: A new method and Android application". Journal of Vegetation Science 30: 1035-1038. doi:10.1111/jvs.12799
Chytrý, M. et al. (2026). "Czech Vegetation Database". Zenodo, version 1.1. doi:10.5281/zenodo.19231152
Govaerts, R. et al. (2021). "The World Checklist of Vascular Plants, a continuously updated resource for exploring global plant diversity". Scientific Data 8: 215. doi:10.1038/s41597-021-00997-6
Govaerts, R. (2026). "The World Checklist of Vascular Plants (WCVP)". Version 16, released on 4 June 2026. Royal Botanic Gardens, Kew. doi:10.15468/6h8ucr
Višňák, R. (1986). "Příspěvek k poznání antropogenní vegetace v severních Čechách, zvláště v městě Liberci". Preslia 58: 353-368. https://www.preslia.cz/archive/Preslia_58_1986_353-368.pdf
Kaplan, Danihelka, Chrtek, Kirschner, Kubát, Štech, and Štěpánek (eds) (2019, ISBN:9788020026606) https://botanospol.cz/cs/node/2681, "Key to the flora of the Czech Republic, Ed. 2., Academia, Praha".
See Also
Useful links:
Report bugs at https://github.com/sesitcsl2/Rveg/issues
CreateChecklist: Create a custom checklist for Rveg
Description
Generates a custom species checklist formatted for use within the Rveg package.
This function takes a list of full botanical names and deterministically converts
them into unique, 7-character ShortName codes.
Rveg includes the following
built-in checklists:
-
cz_dh2012(Default: Checklist of vascular plants of the Czech Republic) -
Czechia_slovakia_2015(Turboveg compatible checklist) -
cz_kaplan2019(Rveg generated - Kaplan et al. 2019) -
wcvp_que(example WCVP subset for Quebec) -
wcvp_por(example WCVP subset for Portugal)
Usage
CreateChecklist(specieslist, export = "export")
Arguments
specieslist |
Character vector OR Character. Either a vector
of full botanical names in your R environment, or a path to a |
export |
Character. The output path and name for the exported checklist. Defaults to a temporary directory. |
Details
ShortName Generation Rules: The function guarantees a unique 7-character code for every species. The first 4 characters always represent a unique Genus code. The remaining 3 characters depend on the taxonomic rank:
-
Standard Species: Genus (4) + first 3 letters of the specific epithet (e.g.,
GENUEPI). -
Species (sp.): Genus (4) +
-SP(e.g.,GENU-SP). -
Hybrids (x): Genus (4) +
*+ first 2 letters of hybrid epithet (e.g.,GENU*HY). -
Aggregates (agg.): Genus (4) +
#+ first 2 letters of main epithet (e.g.,GENU#EP). -
Subspecies (ssp.): Genus (4) + first letter of main epithet +
-+ first letter of infra epithet (e.g.,GENUE-I). -
Varieties/Forms (var./f.): Genus (4) + first letter of main epithet +
;+ first letter of infra epithet (e.g.,GENUE;I). -
Sections (sect.): Genus (4) +
SE+ first letter of section epithet (e.g.,GENUSEE).
Note: If a 7-character code clash occurs, the 7th character is automatically adjusted using trailing letters or alphanumeric fallbacks to ensure absolute uniqueness.
Value
Writes a .txt file containing two columns (ShortName and FullName)
to the location specified by export. The output can be then used
inside addReleve and other functions.
Examples
# Example 1: Creating a checklist from a local txt file
CreateChecklist(
specieslist = paste0(path.package("Rveg"), "/extdata/SpeciesList"),
)
CreateESyRules: Write a custom Expert System rule file
Description
Writes vegetation unit definitions and optional species groups to a UTF-8
ESy rule file for RvegClassify().
Usage
CreateESyRules(definitions, file, groups = NULL)
Arguments
definitions |
Data frame with one row per unit and columns |
file |
Character. Path to the output rule file. |
groups |
Named list of character vectors, with one taxon name per
element of each vector. Group names can begin with an ESy type prefix
followed by a space. Unprefixed names use |
Details
Write conditions in angle brackets and combine them with AND, OR
and NOT. For example, <Alnus lusitanica GR 25> requires cover above
25%. Classification retains matches at the highest matching priority.
Value
Invisibly returns file. Pass the path to the rules argument
of RvegClassify().
Examples
definitions <- data.frame(
code = "A1",
name = "Alder woodland",
formula = "<Alnus lusitanica GR 25>"
)
CreateESyRules(definitions, tempfile(fileext = ".txt"))
CreateVegKey: Build a VegKey model for vegetation classification
Description
Builds a VegKey model from classified reference relevés or a synoptic table of taxon constancies and saves it as an RDS file.
Usage
CreateVegKey(
database = NULL,
unit_column = NULL,
synoptic = NULL,
file,
unit_name_column = NULL,
checklist = "default",
customscale = FALSE,
exclude_layers = c("7", "8"),
source = NULL,
min_constancy = 1e-04,
constancy_scale = c("percent", "proportion")
)
Arguments
database |
Character or list. Path and name of a reference Rveg
database, or a list containing a |
unit_column |
Character. Header field containing vegetation unit
codes. Required when using |
synoptic |
Data frame or character path to a CSV file. Use one row
per taxon and unit with columns |
file |
Character. Path to the output |
unit_name_column |
Character. Optional header field containing unit names for a reference database. Unit codes are used when names are missing. |
checklist |
Character. Species checklist passed to |
customscale |
Logical. Passed to |
exclude_layers |
Character vector. JUICE layer codes omitted from reference records and stored in the model for later classification. |
source |
Optional source information stored in the model. |
min_constancy |
Numeric. Lower bound on constancy during scoring. Must be greater than 0 and at most 1. |
constancy_scale |
Character. Use |
Details
For reference relevés, occurrence constancy is the proportion of usable plots in a vegetation unit where the taxon occurs. When cover is known for all usable species records, the function also estimates dominance constancy as the proportion of plots where the taxon exceeds 25% cover.
Value
Invisibly returns file. Pass the path to the model argument
of RvegClassify() with method = "vegkey".
Examples
synoptic <- data.frame(
unit_code = c("A1", "A2"),
taxon_name = c("Alnus glutinosa", "Fagus sylvatica"),
constancy = c(80, 65)
)
CreateVegKey(synoptic = synoptic, file = tempfile(fileext = ".rds"))
RvegCheck: Inspect, Validate, Edit and Repair an Rveg Database
Description
A diagnostic and managing utility to verify the health and integrity of an Rveg database.
RvegCheck() reads your database, checks for missing or corrupted data,
and outputs a summary of the database's current state.
Usage
RvegCheck(database, export = "export", checklist = "default")
Arguments
database |
Character. The path and name of the existing |
export |
Character. The output path and name where the modified database will be saved. Defaults to a temporary directory. |
checklist |
Character. The species checklist to validate the database against. By default, it uses the checklist defined in the database's metadata. |
Details
Note: This function is currently under active development.
At present, the function serves primarily as a diagnostic and metadata-repair tool.
When run, it checks the database for a project_name and project_description.
If these are missing, it will interactively prompt the user to supply them. It also
prints vital database statistics, including the internal ID, creation date, last
modification date, and any custom species added to the checklist.
In future updates, this function will also allow users to modify core database parameters, such as swapping the underlying species checklist or altering the header schema.
Value
Currently prints diagnostic information directly to the R console.
If modifications are made, it exports the updated database files (*HEAD.csv
and *REL.csv) to the path specified by export.
See Also
RvegMerge for combining databases, RvegCombine for manipulating data within a database.
Examples
if (interactive()) {
# Inspect the built-in example database
RvegCheck(
database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
)
}
RvegClassify: Classify Rveg relevés into vegetation units
Description
Classifies relevés from an Rveg database using formal Expert System (ESy) definitions, a VegKey constancy model, or both.
Usage
RvegClassify(
database,
method = "esy",
rules = "CzechVeg-ESy-basic",
model = "CzechVeg-VegKey",
synonym_file = "WCVP-Czech",
plot_id = NULL,
checklist = "default",
customscale = FALSE,
exclude_layers = c("7", "8"),
top_n = 3L,
min_fpfi = 0,
candidate_units = NULL,
use_dominance = TRUE,
output = NULL,
esy_mode = "separate"
)
Arguments
database |
Character. Path and name of an Rveg database, or
|
method |
Character vector. One or both of |
rules |
Character vector. Use |
model |
Character or list. Use |
synonym_file |
Character. Use |
plot_id |
Vector of plot IDs to classify, or |
checklist |
Character. Species checklist passed to |
customscale |
Logical. Passed to |
exclude_layers |
Character vector. JUICE layer codes omitted from ESy and FPFI. VegKey uses the exclusions stored in the model. |
top_n |
Integer. Maximum number of ranked FPFI or VegKey results per plot and classification run. |
min_fpfi |
Numeric. Minimum FPFI score to retain. |
candidate_units |
Character vector. VegKey unit codes to consider,
or |
use_dominance |
Logical. If |
output |
Character. Directory for |
esy_mode |
Character. Use |
Details
ESy retains all formal matches at the highest matching priority. A missing header value can make the classification uncertain if it affects a rule at or above that priority. When the rule file contains a similarity profile, FPFI ranks the formal matches or, for plots with no formal match, all units represented in that profile.
VegKey ranks units by the product of the constancies of the recorded taxa.
Relative scores sum to 100 across the candidate units before truncating
the ranking to top_n.
Value
For one method, a list containing a plot-level summary and a
taxon_map of original and matched names. ESy also returns all_matches
and fpfi_ranked. VegKey also returns vegkey_ranked. If both methods
are requested, a named list contains one such result per method.
See Also
CreateESyRules(), CreateVegKey()
Examples
## Not run:
RvegClassify("path/to/my_db", rules = "my_rules.txt", synonym_file = NULL)
## End(Not run)
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")
Arguments
database |
Character. The path and name of the existing |
export |
Character. The output path and name where the modified database
files ( |
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 layer2) into another layer (e.g., tree layer3). -
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 both records have positive cover in a relevé, Rveg rounds their probabilistic sum to two decimal places. A single contributing cover is carried forward as recorded.
Combined = C_1 + C_2 \times (1 - \frac{C_1}{100})
Value
Writes two linked CSV files to the location specified by export,
representing the modified Rveg database.
See Also
addReleve for data entry, RvegMerge for merging entire databases.
Examples
if (interactive()) {
RvegCombine(
database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1")
)
}
RvegLoad: Load an Rveg Database into the R Environment
Description
Reads an existing Rveg database (containing relevé data, header data, and metadata)
into R for analysis. By default, it automatically translates the internal 7-character
ShortName codes back into full botanical names and extracts the layer information.
Usage
RvegLoad(
database = "default",
checklist = "default",
customscale = FALSE,
variation = 1
)
Arguments
database |
Character. The path and name of the |
checklist |
Character. The species checklist to use for taxonomy translation. By default, the function uses the checklist specified in the database's metadata. |
customscale |
Logical. If |
variation |
Numeric. Determines the format of the returned object ( |
Details
The structure of the imported data is controlled by the variation parameter:
-
variation = 1(Default): Returns a single, large data frame. The header data (HEAD) is bound to the top of the species composition data (REL), with new columns added forfullNameandlayer. -
variation = 2: Returns the raw database as a list of three elements:$HeaderDATA,$RelDATA, and$meta(metadata) without any taxonomic translation. -
variation = 3: Returns the database as a list of three elements, but$RelDATAis processed to include the translatedfullNameandlayercolumns. -
variation = 4: Returns$HeaderDATAand$RelDATAwith plots in rows, plus$meta. Both tables use the original plot keys (e.g.,X1) as row names. The columns are header fields and taxa by layer, respectively. Taxon columns useFullName_layerorShortName_layerif the checklist has no name for that code. The cover table is numeric when all nonblank values are numeric. Otherwise it preserves the original cover-scale symbols as text.
Custom Scales: If customscale = TRUE, the function operates interactively. It will pause and prompt the user to manually define percentage replacements for any custom abundance symbols found in the data.
Value
A data frame if variation = 1, or a list containing data frames and metadata for variants 2 to 4.
Examples
# Example 1: Load the built-in Rveg database into a single data frame
my_data <- RvegLoad()
# Example 2: Load the database as a list with separated Header and Releve tables
my_list <- RvegLoad(variation = 3)
RvegMerge: Merge Two Rveg Databases
Description
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.
Usage
RvegMerge(database_1, database_2, export = "export")
Arguments
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
( |
Details
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 result uses the first database's checklist. The function warns when the checklists differ and reports code changes and matches based on normalized names.
-
Missing Species: If a species exists in one database but not the other, the function automatically fills the absences with
0. -
Metadata: Taxa without a unique target code are kept as separate entries in
extra_spec. The total number of relevés is updated.
Value
Writes two linked CSV files to the location specified by export, representing
the combined Rveg database.
See Also
RvegCombine for manipulating data within a single database, addReleve for adding individual relevés.
Examples
# Example: Merging the built-in database with itself
db_path <- file.path(path.package("Rveg"), "extdata/ExampleDB", "example_2")
RvegMerge(
database_1 = db_path,
database_2 = db_path
)
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., |
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 use
ISO-8859-15. Rveg warns when it omits unsupported characters from the exported text. 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")
)
RvegToTv: Export an Rveg Database to Turboveg Compatible Format
Description
Exports an existing Rveg database into a CSV format compatible with the
Turboveg vegetation database management system. The function automatically
reconstructs full botanical names from the internal ShortName codes and
maps vegetation layers to standard Turboveg abbreviations.
Usage
RvegToTv(database, export = "export", checklist = "default", ver = 3)
Arguments
database |
Character. The path and name of the existing |
export |
Character. The output path and name where the resulting Turboveg CSV file(s) will be saved. Defaults to a temporary directory. |
checklist |
Character. The species checklist used to match Rveg's 7-character
|
ver |
Numeric. The target Turboveg version format to export to (either |
Details
During export, Rveg's alphanumeric layers are translated into Turboveg's
specific layer codes (e.g., 0 becomes ml, 1 becomes hl, 2 becomes s1,
3 becomes t1, and J becomes jl).
The output structure changes depending on the target Turboveg version specified
by the ver parameter:
-
Turboveg v3 (
ver = 3): Writes a single, combined.csvfile containing both header and species data. -
Turboveg v2 (
ver = 2): Writes two separate files:*R.csvfor relevé species data and*H.csvfor header data.
Value
Writes one or two CSV files to the location specified by export,
depending on the chosen Turboveg version.
Examples
# Example: Exporting the built-in Rveg database to Turboveg v3 format
RvegToTv(
database = file.path(path.package("Rveg"), "extdata/ExampleDB", "example_1"),
ver = 3
)
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 ( |
export |
Character. The output path and name of the new |
checklist |
Character. The species checklist used to match Turboveg full
names to Rveg's 7-character |
Rveglayers |
Logical. If |
Details
This function natively supports both .csv and .xml Turboveg export formats.
In Turboveg, either selecet Standard XML file or Spreadsheet table.
For spreadsheet export, select semicolon-delimited format and include the 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
)
}
addReleve: Digitize and Edit Relevés in an Rveg Database
Description
The core interactive function of the Rveg package. addReleve() launches a
console-based menu system that allows users to create new vegetation databases,
digitize new relevés, and edit existing ones. It seamlessly manages both the
species composition data (REL) and the environmental plot header data (HEAD).
Parameter start was removed.
For list of commands in addReleve menu prompt help or ?
Usage
addReleve(
database = "NEW",
save = "default",
checklist = "default",
customhead = NULL,
extrahead = NULL,
metadata = NULL
)
Arguments
database |
Character. The path and name of an existing Rveg database
(e.g., |
save |
Character. The output path and name where the resulting database
files ( |
checklist |
Character. The species checklist to use. Can be a built-in
checklist (atm: |
customhead |
Character vector. A vector of strings defining completely custom header fields. Overrides the default schema. |
extrahead |
Character vector. Additional header fields to append to the end of the default or existing header schema. |
metadata |
Character vector of length 2. Used to store the Project Title
and Project Description (e.g., |
Value
Writes two linked CSV files (Rveg database) to the location specified by save: one
containing the relevé species data (*REL.csv) and one containing the header data (*HEAD.csv).
Examples
if (interactive()) {
# Launch the interactive menu for a new database
addReleve(
database = "NEW",
save = "my_new_project",
metadata = c("Project Title", "Project Description")
)
}