tv2vegtable {vegtable} | R Documentation |
Import of vegetation data from Turboveg databases
Description
Import function for Turboveg databases into an object of class
vegtable.
Most of the contents of Turboveg databases are included in DBF files and
therefore imported by the function foreign::read.dbf()
.
The automatic setting of database path will be done by the function
vegdata::tv.home()
but it can be customised by the argument tv_home
.
The species list will be imported by using the function
taxlist::tv2taxlist()
and therefore formatted as a taxlist object.
Similarly, conversion tables will be handled as coverconvert objects.
Empty columns in the header will be deleted in the imported object.
The function tv2coverconvert()
reads the content of cover conversion
tables stored in Turboveg and attempts to reformat them in a more
comprehensive structure.
This function is used by tv2vegtable()
to import the respective
conversion table from Turboveg databases.
Note that conversion tables in Turboveg have only stored the middle
point for each cover class in a scale, thus it will be recommended to
rebuild the coverconvert
slot or use braun_blanquet.
Usage
tv2vegtable(
db,
tv_home = tv.home(),
skip_empty_relations = TRUE,
skip_scale,
clean = TRUE
)
tv2coverconvert(file, as.is = TRUE)
Arguments
db |
Name of Turboveg data base as character value. |
tv_home |
Turboveg installation path as character value. |
skip_empty_relations |
Logical value indicating whether empty relations may be excluded from imported database or not. |
skip_scale |
Character value indicating scales to be excluded in slot
|
clean |
Logical value indicating whether output object should be cleaned or not. |
file |
A connection to a DBF file containing conversion table in Turboveg. |
as.is |
A logical value passed to |
Value
A vegtable object in the case of tv2vegtable()
.
A coverconvert object in the case of tv2coverconvert()
.
Author(s)
Miguel Alvarez kamapu78@gmail.com
See Also
taxlist::tv2taxlist()
foreign::read.dbf()
vegdata::tv.home()
Examples
## Installed 'Turboveg' version of 'Fujiwara et al. (2014)'
# TV_Home <- file.path(path.package("vegtable"), "tv_data")
# Veg <- tv2vegtable("Fujiwara_2014", TV_Home)
# summary(Veg)
## Installed 'Turboveg' version of "Fujiwara et al. (2014)"
TV_Home <- file.path(path.package("vegtable"), "tv_data", "popup", "Swea")
Table <- tv2coverconvert(file.path(TV_Home, "tvscale.dbf"))
## First scale have to be deleted from conversion table
Table@value <- Table@value[-1]
Table@conversion <- Table@conversion[-1]
summary(Table)
## Compare the 'Turboveg' version with a vegtable version
data(braun_blanquet)
summary(Table$br_bl)
summary(braun_blanquet$br_bl)