The aim of vegtable is to provide a way for handling databases stored in Turboveg. This package incorporates many concepts and some functions included in the package vegdata but defining an homonymous S4 class containing all elements of a database in just one object. The package vegtable also contains several methods for this object class.

Species lists in vegtable objects are handled by the package taxlist, thus I will recommend to take a look on it.

This package has been developed as a tool handling data stored in SWEA-Dataveg. Further development is running in the context of the project GlobE-wetlands.

An important source of inspiration for vegtable have been the enthusiastic discussions during several versions of the Meetings on Vegetation Databases.

## Updating to the last version of vegtable

The very first step is to install the package devtools and dependencies. Then you just need to execute following commands in your R-session:

library(devtools)
install_github("kamapu/vegtable")

## Some examples

The current version of vegtable includes an example data, which corresponds to a subset from SWEA-Dataveg. This data set contains plot observations done in Kenya imported from 5 sources.

library(vegtable)
#>
#> Attaching package: 'taxlist'
#> The following objects are masked from 'package:base':
#>
#>     levels, print
#>
#> Attaching package: 'vegtable'
#> The following object is masked from 'package:base':
#>
#>     transform
data(Kenya_veg)

# validate and explore
validObject(Kenya_veg)
#> [1] TRUE
summary(Kenya_veg)
#>    sp_list: Easplist
#>    dictionary: Swea
#>    object size: 9501 Kb
#>    validity: TRUE
#>
#> ## Content
#>    number of plots: 1946
#>    plots with records: 1946
#>    number of relations: 3
#>
#> ## Taxonomic List
#>    taxon names: 3164
#>    taxon concepts: 2392
#>    validity: TRUE

Among others, the object contains plot observations done in the Aberdare National Park (Kenya) by Schmitt (1991). We can make a subset including the plots classified by the mentioned author into the Juniperus procera-Podocarpus latifolius community (IDs 780 to 798).

JPcomm <- subset(Kenya_veg, ReleveID %in% c(780:798))
summary(JPcomm)
#>    sp_list: Easplist
#>    dictionary: Swea
#>    object size: 717.4 Kb
#>    validity: TRUE
#>
#> ## Content
#>    number of plots: 19
#>    plots with records: 19
#>    number of relations: 3
#>
#> ## Taxonomic List
#>    taxon names: 3164
#>    taxon concepts: 2392
#>    validity: TRUE

If you have geo-referenced plot observations, you can use the coordinates to produce a map of the distribution of your plots by using the package leaflet.

library(leaflet)
opacity = 0.3, radius = 1)