Title: | Access Vegetation Databases and Treat Taxonomy |
---|---|
Description: | Handling of vegetation data from different sources ( Turboveg 2.0 <https://www.synbiosys.alterra.nl/turboveg/>; the German national repository <https://www.vegetweb.de> and others. Taxonomic harmonization (given appropriate taxonomic lists, e.g. the German taxonomic standard list "GermanSL", <https://germansl.infinitenature.org>). |
Authors: | Florian Jansen <[email protected]> |
Maintainer: | Florian Jansen <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.9.12 |
Built: | 2024-10-26 06:26:10 UTC |
Source: | CRAN |
Handling of vegetation data from different sources ( Turboveg 2.0 https://www.synbiosys.alterra.nl/turboveg/; the German national repository https://www.vegetweb.de and others. Taxonomic harmonization (given appropriate taxonomic lists, e.g. the German taxonomic standard list "GermanSL", https://germansl.infinitenature.org).
Useful links:
Search all (accepted) children of a taxon down to gen generations
child(x, refl, gen = 3, syn = FALSE, include.parent = FALSE, quiet = FALSE, ...)
child(x, refl, gen = 3, syn = FALSE, include.parent = FALSE, quiet = FALSE, ...)
x |
Species number, lettercode or species name(s) |
refl |
Taxonomic reference list |
gen |
Number of child generations to return |
syn |
Should synonyms be included in results |
include.parent |
Should the parent taxon be included in results |
quiet |
Hide screen messages |
... |
additional paarmeters for function tax |
concept: GermanSL is a list with a single taxon view according to the standard lists of the different taxon groups (e.g Wisskirchen and Haeupler for higher plants, see). Nevertheless a huge number of synonyms is included which allows in many cases the transformation into different concepts. For illustration the concept of Armeria maritima from Korneck 1996 is included, which accepts e.g. Armeria maritima ssp. bottendorfensis. parse.taxa: parse genus and epitheta from name strings. taxname.removeAuthors Remove name authors from full scientific name strings.
Florian Jansen [email protected]
Jansen, F. and Dengler, J. (2008) GermanSL - eine universelle taxonomische Referenzliste für Vegetationsdatenbanken. Tuexenia, 28, 239-253.
Combine species in vegetation matrix
comb.species(x, sel, newname, refl)
comb.species(x, sel, newname, refl)
x |
(veg) vegetation matrix of class veg |
sel |
(character) vector of species to combine |
newname |
(character) name of the new taxon |
refl |
(character) Name of taxonomic reference list |
Calculates community weighted mean trait values, like mean Ellenberg indicator values. Alternatively (method = 'mode') environmental conditions can be calculated according to the concept of sums of amplitudes of species along ecological gradients.
cwm(veg, refl, trait.db = 'ecodbase.dbf', ivname, keyname = 'LETTERCODE', method, weight, db, ...)
cwm(veg, refl, trait.db = 'ecodbase.dbf', ivname, keyname = 'LETTERCODE', method, weight, db, ...)
veg |
Vegetation matrix with plots in rows and species in columns |
refl |
Name of Turboveg taxonomic reference list |
trait.db |
data frame with species trait values |
ivname |
Name of the trait in trait.db to be used |
keyname |
Name of the column in trait dataframe to join with colnames of veg table |
method |
mean (weighted value of single traits, or mode (maximum) of trait classes) |
weight |
additional weight, e.g niche breath of species |
db |
name of Turboveg database |
... |
additional arguments |
Trait values of 0 will be handled as NA values because Turboveg dBase can not handle NA values properly.
Vector with the ecological classification of sites. Either mean trait values or mode of gradient classes.
Florian Jansen [email protected]
## Not run: db <- 'elbaue' veg <- tv.veg(db, cover.transform='sqrt', check.critical = FALSE) site <- tv.site(db, verbose = FALSE) #' Exclude plots with very high water level fluctuation veg <- veg[site$SDGL < 60,] veg <- veg[,colSums(veg) > 0] site <- site[site$SDGL < 60,] #' Load species trait value database traits <- tv.traits(db) #' Mean indicator values of Ellenberg F values mEIV_F <- cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mean') plot(site$MGL, mEIV_F, xlab = 'Mean groundwater level') #' Mode (most frequent level) of Ellenberg F values ilevel <- cwm(veg, trait.db = traitmat, ivname = as.character(1:11), method = 'mode') mode <- as.numeric(cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mode')) boxplot(site$MGL ~ mode) ## End(Not run)
## Not run: db <- 'elbaue' veg <- tv.veg(db, cover.transform='sqrt', check.critical = FALSE) site <- tv.site(db, verbose = FALSE) #' Exclude plots with very high water level fluctuation veg <- veg[site$SDGL < 60,] veg <- veg[,colSums(veg) > 0] site <- site[site$SDGL < 60,] #' Load species trait value database traits <- tv.traits(db) #' Mean indicator values of Ellenberg F values mEIV_F <- cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mean') plot(site$MGL, mEIV_F, xlab = 'Mean groundwater level') #' Mode (most frequent level) of Ellenberg F values ilevel <- cwm(veg, trait.db = traitmat, ivname = as.character(1:11), method = 'mode') mode <- as.numeric(cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mode')) boxplot(site$MGL ~ mode) ## End(Not run)
Download taxonomic databases
db_download_eurosl(version = "latest", verbose = TRUE, overwrite = FALSE) db_download_germansl(version = "latest", verbose = TRUE, overwrite = FALSE)
db_download_eurosl(version = "latest", verbose = TRUE, overwrite = FALSE) db_download_germansl(version = "latest", verbose = TRUE, overwrite = FALSE)
version |
(character) desired version number of the list |
verbose |
(logical) Print messages. Default: 'TRUE' |
overwrite |
(logical) If 'TRUE' force an update by overwriting previously downloaded data. Default: 'FALSE' |
Downloads sql database, cleans up unneeded files, returns path to sql file
(character) path to the downloaded SQL database
[tdb_cache]
## Not run: # EuroSL # db_download_eurosl() # src_eurosl() # GermanSL # db_download_germansl() # db_download_germansl(overwrite=TRUE) # overwrite - download again # src_germansl() ## End(Not run)
## Not run: # EuroSL # db_download_eurosl() # src_eurosl() # GermanSL # db_download_germansl() # db_download_germansl(overwrite=TRUE) # overwrite - download again # src_germansl() ## End(Not run)
database path
db_path(db)
db_path(db)
db |
(character) db name. one of: eurosl, germansl |
This is an example vegetation dataset to be included in package vegdata
Florian Jansen [email protected]
datasets with layer codes and how they should be combined in vegetation anlyses. lc.o: do not combine any layers
lc.0
lc.0
A data frame with rows and 2 variables:
Layer code, i.e. 0:9 for Turboveg
Combinations. Same integer means, they will be combined
datasets with layer codes and how they should be combined in vegetation anlyses.
lc.1
lc.1
A data frame with rows and 3 variables:
Layer code, i.e. 0:9 for Turboveg
Combinations. Same integer means, they will be combined
combine all layers
lc.all
lc.all
A data frame with rows and 2 variables:
Layer code, i.e. 0:9 for Turboveg
Combinations. Same integer means, they will be combined
#' Parents of a taxon
parent(x, refl = tv.refl(), rank, quiet = FALSE, ...)
parent(x, refl = tv.refl(), rank, quiet = FALSE, ...)
x |
Species number, lettercode or species name(s) |
refl |
Taxonomic reference list |
rank |
taxonomic level of taxa to find |
quiet |
Hide screen messages |
... |
additional attributes for function tax |
concept: GermanSL is a list with a single taxon view according to the standard lists of the different taxon groups (e.g Wisskirchen and Haeupler for higher plants, see). Nevertheless a huge number of synonyms is included which allows in many cases the transformation into different concepts. For illustration the concept of Armeria maritima from Korneck 1996 is included, which accepts e.g. Armeria maritima ssp. bottendorfensis. parse.taxa: parse genus and epitheta from name strings. taxname.removeAuthors Remove name authors from full scientific name strings.
Florian Jansen [email protected]
Jansen, F. and Dengler, J. (2008) GermanSL - eine universelle taxonomische Referenzliste für Vegetationsdatenbanken. Tuexenia, 28, 239-253.
Parse taxon strings into genus part and epitheta
parse.taxa(x, epis)
parse.taxa(x, epis)
x |
(character) taxon names |
epis |
(character) vector of separators for epithets (like e.g. "subsp.") |
Recode species names, lettercodes or ID's
recode.species( x, names = c("shortletters", "Numbers", "ScientificNames"), refl )
recode.species( x, names = c("shortletters", "Numbers", "ScientificNames"), refl )
x |
vector of species |
names |
one of 7digit shortletter codes, species id's or scientific species names |
refl |
(character) name of taxon reference list |
Query and get data back into a data.frame
sql_collect(src, query, ...)
sql_collect(src, query, ...)
src |
(src) An 'src' object, result of calling [src_germansl()], [src_eurosl()] |
query |
(character) A SQL query |
... |
further args passed on to [dplyr::tbl()] |
we run [dplyr::tbl()], then [dplyr::collect()]
## Not run: src <- src_germansl() sql_collect(src, "select * from GermanSL limit 5") ## or pipe the src to sql_collect src %>% sql_collect("select * from GermanSL limit 5") ## End(Not run)
## Not run: src <- src_germansl() sql_collect(src, "select * from GermanSL limit 5") ## or pipe the src to sql_collect src %>% sql_collect("select * from GermanSL limit 5") ## End(Not run)
src - dplyr src objects
src_eurosl(path = db_path("eurosl"), ...) src_germansl(path = db_path("germansl"), ...)
src_eurosl(path = db_path("eurosl"), ...) src_germansl(path = db_path("germansl"), ...)
path |
(character) path to SQLite database. by default we use the function [db_path()] to get the path |
... |
Further args passed on to [DBI::dbConnect()] |
an src object
## Not run: # src_eurosl() # src_germansl() ## End(Not run)
## Not run: # src_eurosl() # src_germansl() ## End(Not run)
Search synonyms of a taxon
syn(x, refl = tv.refl(), quiet = FALSE, ...)
syn(x, refl = tv.refl(), quiet = FALSE, ...)
x |
Species number, lettercode or species name(s) |
refl |
Taxonomic reference list |
quiet |
Hide screen messages |
... |
additional attributes for function tax |
concept: GermanSL is a list with a single taxon view according to the standard lists of the different taxon groups (e.g Wisskirchen and Haeupler for higher plants, see). Nevertheless a huge number of synonyms is included which allows in many cases the transformation into different concepts. For illustration the concept of Armeria maritima from Korneck 1996 is included, which accepts e.g. Armeria maritima ssp. bottendorfensis. parse.taxa: parse genus and epitheta from name strings. taxname.removeAuthors Remove name authors from full scientific name strings.
Florian Jansen [email protected]
Jansen, F. and Dengler, J. (2008) GermanSL - eine universelle taxonomische Referenzliste für Vegetationsdatenbanken. Tuexenia, 28, 239-253.
Calculate and display relative or absolute frequency tables with or without use of function multipatt from package indicspecies
syntab(veg, clust, type = c('rel','abs','mean.cover'), mupa, dec=0, refl, ...) ## S3 method for class 'syntab' print(x, zero.print = ".", trait, limit = 1, minstat = 0, alpha = 0.05, ...)
syntab(veg, clust, type = c('rel','abs','mean.cover'), mupa, dec=0, refl, ...) ## S3 method for class 'syntab' print(x, zero.print = ".", trait, limit = 1, minstat = 0, alpha = 0.05, ...)
veg |
Vegetation dataframe |
clust |
Vector with cluster information with length equal to number of rows of veg |
type |
Relative or absolute frequency, mean species response values or strength of association. |
mupa |
Either logical for (not) using multipatt from package indicspecies to detect significance of cluster association strength or supply output from previous use of multipatt. |
dec |
Number of decimals in result. |
refl |
Name of Turboveg taxonomic reference list to use for fullnames. |
... |
additional arguments |
x |
Object from function syntab |
zero.print |
Replacement for zero values. |
trait |
Optional vector of trait values to be plotted behind the species. |
limit |
Minimum value to display. |
minstat |
Minimal indicator value |
alpha |
Significance threshold. |
Florian Jansen [email protected]
Package indicspecies with function multipatt for indicator species analysis along multiple cluster combinations
## Not run: elbaue <- tv.veg('elbaue') elbaue.env <- tv.site('elbaue') clust <- vector('integer', nrow(elbaue.env)) clust[elbaue.env$MGL < -50 & elbaue.env$SDGL < 50] <- 1 clust[elbaue.env$MGL < -50 & elbaue.env$SDGL >= 50] <- 2 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL >= 50] <- 3 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL < 50] <- 4 levels(clust) <- c('dry.ld','dry.hd', 'wet.hd','wet.ld') traits <- tv.traits() m <- match(rownames(st$syntab), traits$LETTERCODE, nomatch = 0) trait <- traits[m, c("OEK_F","OEK_N")] rownames(trait) <- traits$LETTERCODE[m] st <- syntab(elbaue, clust, mupa=TRUE) print(st, limit=30, trait=trait) #' Manipulation of the syntaxonomic table sttable <- st$syntab sttable <- sttable[sttable$p.value < 0.05 & !is.na(sttable$p.value), !names(sttable) %in% c('stat')] taxa <- tax(rownames(sttable)) rownames(sttable) <- taxa[match(rownames(sttable), taxa$LETTERCODE, nomatch = 0),'TaxonName'] write.csv(sttable, 'sttable.csv') ## End(Not run)
## Not run: elbaue <- tv.veg('elbaue') elbaue.env <- tv.site('elbaue') clust <- vector('integer', nrow(elbaue.env)) clust[elbaue.env$MGL < -50 & elbaue.env$SDGL < 50] <- 1 clust[elbaue.env$MGL < -50 & elbaue.env$SDGL >= 50] <- 2 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL >= 50] <- 3 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL < 50] <- 4 levels(clust) <- c('dry.ld','dry.hd', 'wet.hd','wet.ld') traits <- tv.traits() m <- match(rownames(st$syntab), traits$LETTERCODE, nomatch = 0) trait <- traits[m, c("OEK_F","OEK_N")] rownames(trait) <- traits$LETTERCODE[m] st <- syntab(elbaue, clust, mupa=TRUE) print(st, limit=30, trait=trait) #' Manipulation of the syntaxonomic table sttable <- st$syntab sttable <- sttable[sttable$p.value < 0.05 & !is.na(sttable$p.value), !names(sttable) %in% c('stat')] taxa <- tax(rownames(sttable)) rownames(sttable) <- taxa[match(rownames(sttable), taxa$LETTERCODE, nomatch = 0),'TaxonName'] write.csv(sttable, 'sttable.csv') ## End(Not run)
Input is either species number (integer), shortletter (7 characters) or full (exact!) species name.
tax(x, refl, detailed = TRUE, syn = TRUE, concept = NULL, strict = FALSE, simplify = FALSE, quiet = FALSE, ...)
tax(x, refl, detailed = TRUE, syn = TRUE, concept = NULL, strict = FALSE, simplify = FALSE, quiet = FALSE, ...)
x |
Species number, lettercode or species name(s) |
refl |
Taxonomic reference list |
detailed |
In old Turboveg versions detailed taxonomic information could only be given in an extra file which was called tax.dbf in GermanSL. Compatibility mode. |
syn |
Return also synonym names |
concept |
Name of the file with an alternative taxon view stored in the reference list directory, see details. |
strict |
Exact match or partial matching with |
simplify |
Should taxname.simplify be applied to find species |
quiet |
Hide screen messages |
... |
additional attributes for taxname.abbr or taxname.simplify |
concept: GermanSL is a list with a single taxon view according to the standard lists of the different taxon groups (e.g Wisskirchen and Haeupler for higher plants, see). Nevertheless a huge number of synonyms is included which allows in many cases the transformation into different concepts. For illustration the concept of Armeria maritima from Korneck 1996 is included, which accepts e.g. Armeria maritima ssp. bottendorfensis. parse.taxa: parse genus and epitheta from name strings. taxname.removeAuthors Remove name authors from full scientific name strings.
Florian Jansen [email protected]
Jansen, F. and Dengler, J. (2008) GermanSL - eine universelle taxonomische Referenzliste für Vegetationsdatenbanken. Tuexenia, 28, 239-253.
hierarchy of taxon levels
taxlevels
taxlevels
A data frame with rows and 3 variables:
Layer code, i.e. 0:9 for Turboveg
Combinations. Same integer means, they will be combined
taxon level name in http://www.europlusmed.org/ database
Explanation of level codes
Standardisation of taxonomic names, especially taxon rank indicators and hybrid signs name taxname.abbr
taxname.abbr(x, hybrid = TRUE, concept = FALSE, species = TRUE, cf = TRUE, ...)
taxname.abbr(x, hybrid = TRUE, concept = FALSE, species = TRUE, cf = TRUE, ...)
x |
(integer or character) Species number, lettercode or species name(s) |
hybrid |
(logical) remove hybrid markers for comparisons |
concept |
(logical) remove concept additions like "s. str.", "s. l. |
species |
(logical) remove "spec.", "sp.", or "species" for genus level taxa |
cf |
(logical) remove 'in doubt' marker |
... |
additional attributes |
Florian Jansen [email protected]
Remove name authors from taxon names
taxname.removeAuthors(x, sep)
taxname.removeAuthors(x, sep)
x |
(character) vector of taxon names |
sep |
(character) vector of rank indicators |
Simplify name parts for better string matching
taxname.simplify( x, genus = TRUE, epithet = TRUE, concept = TRUE, rank = TRUE, tax.status = TRUE, ... )
taxname.simplify( x, genus = TRUE, epithet = TRUE, concept = TRUE, rank = TRUE, tax.status = TRUE, ... )
x |
(integer or character) Species number, lettercode or species name(s) |
genus |
(logical) simplify genus name part |
epithet |
(logical) simplify epithet(s) |
concept |
(logical) remove name parts which describe taxon concept size like "s. str.","s. l." |
rank |
(logical) remove rank specifications |
tax.status |
(logical) remove taxon status like 'nom. illeg.' or 'auct.' |
... |
additional attributes |
taxname.abbr will be applied beforehand automatically. The function simplifies name parts which are empirically unstable, i.e. sylvatica might also written as silvatica, or majus vs. maius. Sex of latin genus or epithet name parts often change and are therefore deleted (us vs. a, ea vs. eos, etc.). Hybrid signs are removed. taxname.simpl works well for plant names, but be careful with very long name lists or if combined with animal taxa which are sometimes very short and can be confused after applying taxname.simpl
Florian Jansen [email protected]
Performs taxonomic valuation of species names according to synonomy, taxonomic level, unambiguous biotic content etc. Necessary prerequisite is information about taxonomic status (synonomy) and hierarchy (next higher aggregate). Until now only applicable for reference list 'GermanSL' (>= version 1.1, see References Section), which is valid in Germany and adjacent countries.
taxval(obs, refl, db, ag = c('conflict', 'adapt', 'preserve'), rank, mono = c('species', 'higher', 'lower', 'preserve'), monolist = "monotypic-D", maxtaxlevel = 'AGG', check.critical = TRUE, interactive = FALSE, ...)
taxval(obs, refl, db, ag = c('conflict', 'adapt', 'preserve'), rank, mono = c('species', 'higher', 'lower', 'preserve'), monolist = "monotypic-D", maxtaxlevel = 'AGG', check.critical = TRUE, interactive = FALSE, ...)
obs |
data.frame of observations in TURBOVEG format, for example loaded with |
refl |
Name of taxonomic reference list |
db |
a name of a Turboveg database directory containing |
ag |
Treatment of children and parents within the dataset, see details |
rank |
If ag='adapt', rank specifies the taxonomic rank to which taxa should be coarsened to. All higher taxa in this taxonomic tree will be deleted, see maxtaxlevel. |
mono |
Should monotypic taxa be combined at subspecies = lower or species level = higher |
monolist |
Name of monotypic species list, must be in dBase format and in the same directory as the reference list, e.g. |
maxtaxlevel |
Maximum taxonomic levels to be used. See details. |
check.critical |
Check for critical names in your dataset and give warnings.' |
interactive |
Do you want to adapt the list of changes. |
... |
Other parameters passed to functions. |
Working with vegetation datasets, especially from different sources needs taxonomic valuation. The function tries to automate this process. Therefore the German taxonomic reference list (GermanSL, https://germansl.infinitenature.org ) contains additional taxon attributes (tax.dbf) and monotypic taxa of Germany (monotypic.dbf). Without an appropriate species list (see tax
) the function will not work.
The taxonomic reference list needs Taxonrank corresponding to values given in taxlevels
Possible values for adapting the taxonomic hierarchy within the dataset (child/parent taxa) are: preserve
: Leave everything untouched. conflict
: Dissolve only in case of conflicts, e.g. if a subspecies occurs also at the species level within the same dataset. In this case the subspecies will be aggregated to the higher level. adapt
: Dissolve all nested taxa to e.g. species level for option ag. For this option also option rank
, specifying the rank to which the taxa shall be adapted, must be given.
Monotypic taxa, e.g. a species which occur only with 1 subspecies in the survey area. They have to be combined, since otherwise two different (valid) taxa would denominate the same entity. If lower the higher taxon (e.g. species rank) is replaced by the lower level (subspecies rank). If neither lower
nor higher
monotypic species are preserved. Since the list of monotypic species strongly depends on the considered area you have to choose, which area is covered by your database and create an appropriate list of monotypic taxa. Within the package "monotypic-D.csv"
is provided as a compilation of monotypic species within the GermanSL list.
Option maxtaxlevel determines the maximum taxonomic level within the given names, which should be used. All higher taxon observations are deleted. If you have a single field observation determined as Asteraceae spec. all your obervations of taxa from that family will be aggregated to the family level, if you choose ag=conflict.
Interactive
If you want to manually adapt the taxonomic harmonization interactive=TRUE
will create a table with all original names and NewTaxonID's according to the chosen rules. The table will be saved as taxvalDecisionTable.csv
in your actual working directory. You can manipulate the column NewTaxonID. If you run taxval
again (e.g. through function tv.veg
) and a file with this name exist in your working directory, it will be used.
Functions return the input dataframe of observations with harmonised taxon numbers.
Florian Jansen [email protected]
Jansen, F. and Dengler, J. (2008) GermanSL - eine universelle taxonomische Referenzliste f\"ur Vegetationsdatenbanken. Tuexenia, 28, 239-253. Jansen, F. and Dengler, J. (2010) Plant names in vegetation databases - a neglected source of bias. Journal of Vegetation Science, 21, 1179-1186.
tv.veg, tv.obs
## Not run: # Turboveg installation needed obs <- taxval(db='taxatest') # For explanations see vignette('vegdata'). veg <- tv.veg('taxatest') veg <- comb.species(veg, c('ARMEM-E','ARMEM-H')) ## End(Not run)
## Not run: # Turboveg installation needed obs <- taxval(db='taxatest') # For explanations see vignette('vegdata'). veg <- tv.veg('taxatest') veg <- comb.species(veg, c('ARMEM-E','ARMEM-H')) ## End(Not run)
Applies Taxonomic Concept Transfer Schema (TCS) to the different name list conventions of different sources
TCS.replace(x)
TCS.replace(x)
x |
(character) string of column names used in data.frames storing taxon lists |
Florian Jansen [email protected]
Taxonomic Names and Concepts interest group. 2006. Taxonomic Concept Transfer Schema (TCS), version 1.01. Biodiversity Information Standards (TDWG) http://www.tdwg.org/standards/117
Manage cached vegdata files with hoardr
'cache_delete' only accepts 1 file name, while ‘cache_delete_all' doesn’t accept any names, but deletes all files. For deleting many specific files, use 'cache_delete' in a [lapply()] type call
- 'tdb_cache$cache_path_get()' get cache path - 'tdb_cache$cache_path_set()' set cache path - 'tdb_cache$list()' returns a character vector of full path file names - 'tdb_cache$files()' returns file objects with metadata - 'tdb_cache$details()' returns files with details - 'tdb_cache$delete()' delete specific files - 'tdb_cache$delete_all()' delete all files, returns nothing
## Not run: tdb_cache # list files in cache tdb_cache$list() # delete certain database files # tdb_cache$delete("file path") # tdb_cache$list() # delete all files in cache # tdb_cache$delete_all() # tdb_cache$list() ## End(Not run)
## Not run: tdb_cache # list files in cache tdb_cache$list() # delete certain database files # tdb_cache$delete("file path") # tdb_cache$list() # delete all files in cache # tdb_cache$delete_all() # tdb_cache$list() ## End(Not run)
Check bibliographic references from Turboveg codes
tv.bib(x = "all", db, dict = tv.dict(db), quiet = FALSE, tv_home, ...)
tv.bib(x = "all", db, dict = tv.dict(db), quiet = FALSE, tv_home, ...)
x |
(character) Turboveg reference code(s), e.g. "000001" |
db |
(character) Database name. Needed to select appropriate TV Dictionary folder. |
dict |
(character) Name of Turboveg Dictionary (term lists for header data) if not the default one. |
quiet |
(logical) If you want to print the reference to the screen. |
tv_home |
(character) Turbowin installation path. If not specified function [tv.home()] tries to discover. |
... |
additional arguments |
Dataframe of (selected) bibliographic references (when assigned to an object).
Florian Jansen [email protected]
Translate cover code into percentage cover values for Turboveg database observations.
tv.coverperc(db, obs, RelScale, tv_home, tvscale, quiet = FALSE, ...)
tv.coverperc(db, obs, RelScale, tv_home, tvscale, quiet = FALSE, ...)
db |
the name of the Turboveg database |
obs |
dataframe of observations, containing Cover Codes, coded in tvscale.dbf of Turboveg installation |
RelScale |
Dataframe of CoverScale codes per releve, if empty it is read from the database |
tv_home |
Path to Turboveg installation |
tvscale |
Cover scale |
quiet |
Suppress messages |
... |
Further options |
data.frame of observations with additional column COVER_PERC
keywords Turboveg
Read list of available Turboveg2 databases in given Turboveg directory
Read list of available Turboveg2 databases in given Turboveg directory
tv.db(path) tv.dict(db, tv_home)
tv.db(path) tv.dict(db, tv_home)
path |
(character) directory path inside Turboveg/data directory |
db |
(character) name of Turboveg database/directory |
tv_home |
(character) path of Turboveg instalation |
List of databases below specified path
Florian Jansen [email protected]
Reads and sets invisbly option('tv_home')
tv.home(check = FALSE)
tv.home(check = FALSE)
check |
(logical) reset even if option('tv_home') is already set |
Reads and sets invisbly option('tv_home')
Florian Jansen [email protected]
Showing "metadata.txt" when specified and saved in Turboveg database directory. When db = 'eco' and refl specified, metainfo of species attribute table is displayed.
tv.metadata(db, refl, tv_home, filename = 'metadata.txt', ...)
tv.metadata(db, refl, tv_home, filename = 'metadata.txt', ...)
db |
Turboveg database name |
refl |
Turboveg taxonomic reference list, declaration only necessary for ecodbase info |
tv_home |
Turboveg installation path |
filename |
Name of metainfo file residing in database directory |
... |
additional arguments |
Because Turboveg provides no formalised method to store information about database fields, I suggest to save a simple text file, named for example "metadata.txt" into the directory of your Turboveg database.
Florian Jansen [email protected]
Dataframe of plot-species observations directly from Turboveg.
tv.obs(db, tv_home, ...)
tv.obs(db, tv_home, ...)
db |
(character) Name of your Turboveg database. This is the directory name containing tvabund.dbf, tvhabita.dbf and tvwin.set. Please include pathnames below but not above Turbowin/Data. |
tv_home |
(character) Turbowin installation path. If not specified function |
... |
additional arguments |
Data.frame of species occurrences in Turboveg format, that is every occurrence is a row with releve number, species number, layer, cover code and optional additional species-plot information.
Florian Jansen [email protected]
## Not run: # Turboveg installation needed obs <- tv.obs('taxatest') head(obs) ## End(Not run)
## Not run: # Turboveg installation needed obs <- tv.obs('taxatest') head(obs) ## End(Not run)
Reads Turboveg XML formatted files species-plot observations and site information into a list
tv.readXML(file)
tv.readXML(file)
file |
(character) Path name of the Turboveg XML file |
S3 list with elements tvwin, tvadmin, site, and obs
Florian Jansen [email protected]
Taxon reference list to be used
tv.refl(refl, db, tv_home)
tv.refl(refl, db, tv_home)
refl |
name of reference list |
db |
Turboveg database name |
tv_home |
Turboveg installation path |
Rename data.frame columns to match Turboveg 2 conventions
TV.replace(x)
TV.replace(x)
x |
(character) string vector of column names |
Loading Turboveg header data and do basic data evaluation. Empty columns are eliminated and warnings about possibly wrong '0' values are performed
tv.site(db, tv_home, drop=TRUE, common.only = FALSE, verbose = TRUE, replace.names, ...)
tv.site(db, tv_home, drop=TRUE, common.only = FALSE, verbose = TRUE, replace.names, ...)
db |
(character) Name of your Turboveg database(s). Directory name containing tvabund.dbf, tvhabita.dbf and tvwin.set. |
tv_home |
(character) Turbowin installation path. Optional, if Turbowin is either on "C:/Turbowin" or "C:/Programme/Turbowin". |
drop |
(logical) Drop variables without values. |
common.only |
(logical) Import only header data with the same name in all databases. |
verbose |
(logical) print warnings and hints |
replace.names |
(data.frame) replace variable names. Useful if using multiple source databases. Data frame with names to be replaced in first and replacing names in second column. |
... |
Additional options like |
Please specify pathnames below but not above Turbowin/Data. Can be a single database or a character vector of multiple databases. In the latter case you have to assure, that all databases use the same taxonomic reference list.
You can use the example in the final output line to make a summary statistic for attributes with potentially misleading '0' values. Just delete the \" at beginning and end.
data.frame of site variables.
Florian Jansen [email protected]
Loading Turboveg ecodbase or any other specified dBase file in this directory and do basic data evaluation. Empty columns are eliminated.
tv.traits(db, trait.db = 'ecodbase.dbf', refl, ...)
tv.traits(db, trait.db = 'ecodbase.dbf', refl, ...)
db |
Path name to the Turboveg database directory |
trait.db |
Name of species trait dBase file, default is 'ecodbase' |
refl |
Name of the taxonomic reference list, if veg is not loaded with tv.veg |
... |
additional arguments for tv.traits |
You can use the final output line to make a summary statistic for attributes with potentially misleading '0' values.
data.frame of ecological traits, see metainfo(refl, eco=TRUE)
Florian Jansen [email protected]
Tabulates vegetation tables from Turboveg resp. VegetWeb database, including taxonomic emendation and layer combination. Using various default parameters for the included functions. It is a wrapper for *tv.obs*, *taxval*, *tv.coverperc* and creating a vegetation matrix
tv.veg(db, taxval=TRUE,tv_home,convcode=TRUE, lc = c("layer","mean","max","sum","first"), pseudo, values='COVER_PERC', spcnames=c('shortletters','ScientificNames','Numbers'), dec = 0, cover.transform = c('no', 'pa', 'sqrt'), obs, site, refl, RelScale, ...)
tv.veg(db, taxval=TRUE,tv_home,convcode=TRUE, lc = c("layer","mean","max","sum","first"), pseudo, values='COVER_PERC', spcnames=c('shortletters','ScientificNames','Numbers'), dec = 0, cover.transform = c('no', 'pa', 'sqrt'), obs, site, refl, RelScale, ...)
db |
Name of your Turboveg database. Directory name containing tvabund.dbf, tvhabita.dbf and tvwin.set. Please specify pathnames below (if you sorted your databases in subfolders) but not above Turbowin/Data. |
taxval |
Should taxonomic valuation (see |
tv_home |
Turbowin installation path. |
convcode |
Should cover code be converted to percentage values? |
lc |
Layer combination type. Possible values: layer (default), sum, mean or max, see details |
pseudo |
List used for layer combinations, see details |
values |
Name of the variable which should be used for the vegetations matrix. |
spcnames |
Should species numbers be replaced by shortletters or ScientificNames? Layer information is appended with dot. |
dec |
Number of decimals for cover values in the resulting vegetation matrix. |
cover.transform |
If you want to transform the abundancce values within your samples
you can choose 'pa' for presence-absence or 'sqrt' for the |
obs |
Observations, optional |
site |
plot header data, see |
refl |
Taxonomic reference list, optional |
RelScale |
Vector with Cover Scale code per Releve. |
... |
additional arguments for included functions |
layer
means, the different layers are combined assuming there independence (a species occurring in two layers with a cover of 50% will result in a overall cover of 75%. sum
will sum up cover values of all layers With option pseudo
you can decide, which layers should be combined. Give a list with a combination data.frame and second the name of the column for combination. The default is pseudo = list(lc.1, c('LAYER'))
, where lc.1 is a data.frame data(lc.1)
, which will combine all tree layers, all shrub layers and all layers below shrubs. An alternative would be data(lc.all), combining all layers. With option pseudo=NULL there will be no layer aggregation.
an object of class matrix with (combined) cover values.
Florian Jansen [email protected]
taxval
, tv.coverperc
, tv.obs
, tv.site
## Not run: vignette("vegdata") #' If you have Turboveg installed on your computer try for a beginning #' tv.veg('databasename', tax=FALSE). args(tv.veg) help('taxval') veg <- tv.veg('taxatest') names(veg) tv.veg('taxatest', uncertain=list('DET_CERT', data.frame(0:2,c('pres','agg','agg'))), pseudo=list(lc.0,'LAYER'), genus = 'delete') ## End(Not run)
## Not run: vignette("vegdata") #' If you have Turboveg installed on your computer try for a beginning #' tv.veg('databasename', tax=FALSE). args(tv.veg) help('taxval') veg <- tv.veg('taxatest') names(veg) tv.veg('taxatest', uncertain=list('DET_CERT', data.frame(0:2,c('pres','agg','agg'))), pseudo=list(lc.0,'LAYER'), genus = 'delete') ## End(Not run)
Write species-plot observations and site information to Turboveg database.
tv.write(x, site, name, tvadmin, remarks, dict = "", cover = c("code", "perc"), drop = FALSE, obl = TRUE, overwrite = FALSE, ...)
tv.write(x, site, name, tvadmin, remarks, dict = "", cover = c("code", "perc"), drop = FALSE, obl = TRUE, overwrite = FALSE, ...)
x |
(data.frame) Either observations data.frame with RELEVE_NR, TaxonUsageID and COVER_CODE (see tv.obs) columns or vegetation matrix of class "veg". |
site |
(character) Header data for plots. |
name |
(character) Name of the new database. |
tvadmin |
(data.frame) Dataframe with plot UUID's and Turboveg columns from TvAdmin.dbf. A new file with new unique identifiers will be created if omitted. |
remarks |
(data.frame) Remarks in Turboveg format if the comments for individual plots exceed 254 characters. See remarks.dbf in Turboveg databases. An empty file will be created if omitted. |
dict |
(character) Turboveg dictionary name |
cover |
(logical) Use of covercodes or (mean) cover percentages, see Details. |
drop |
(logical) Drop columns which are empty or contain only NA values. |
obl |
(logical) Add obligatory fields defined in the TV dictionary but not present in the site data table. |
overwrite |
(logical) Should an existing database be overwritten. |
... |
additional arguments |
By default Covercode is written to Turboveg. This is only meaningful, if correct CoverScales are given in the site dataframe. Unique plot ID's are stored in *TvAdmin.dbf*. If you want to preserve already given UUID's you have to prepare an appropriate data.frame. Look for existing *TvAdmin.dbf* files for necessary columns.
Five files will be created in "tv_home/Data/databasename" directory. *tvabund.dbf* with occurrence information n long format, *tvhabita.dbf* with plot information, remarks.dbf with comments longer then 255 characters, *TvAdmin.dbf* with plot UUID's and tvwin.dbf with information about taxonomic reference list, and dictionary used.
Florian Jansen @email [email protected]
tv.veg