Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
R
 
 
 
 
 
 
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

vegtable

CRAN_Status_Badge Rdoc DOI
R-CMD-check codecov
CRAN_downloads total downloads

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)
#> Loading required package: taxlist
#> 
#> 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)
#> ## Metadata 
#>    db_name: Sweadataveg
#>    sp_list: Easplist
#>    dictionary: Swea
#>    object size: 9501 Kb 
#>    validity: TRUE 
#> 
#> ## Content 
#>    number of plots: 1946 
#>    plots with records: 1946 
#>    variables in header: 34 
#>    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)
#> ## Metadata 
#>    db_name: Sweadataveg
#>    sp_list: Easplist
#>    dictionary: Swea
#>    object size: 717.4 Kb 
#>    validity: TRUE 
#> 
#> ## Content 
#>    number of plots: 19 
#>    plots with records: 19 
#>    variables in header: 17 
#>    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)
leaflet(JPcomm@header) %>%
        addTiles() %>%
        addCircleMarkers(lng = ~LONGITUDE, lat = ~LATITUDE, color = "red",
                opacity = 0.3, radius = 1)
<script type="application/json" data-for="htmlwidget-789f5e4c1c2347772c22">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"© OpenStreetMap<\/a> contributors, CC-BY-SA<\/a>"}]},{"method":"addCircleMarkers","args":[[-0.21783606,-0.228685,-0.21965095,-0.21874659,-0.1835005,-0.21874232,-0.2160302,-0.22145907,-0.20879751,-0.20066322,-0.20970267,-0.20518737,-0.22235895,-0.20608739,-0.20608767,-0.16993217,-0.15185806,-0.18981772,-0.15276177],[36.52849996,36.54196582,36.57159667,36.56890322,36.61649612,36.54286533,36.54017222,36.57339212,36.53029708,36.53478754,36.53837753,36.56531387,36.5491497,36.54017378,36.54196948,36.54377023,36.57699314,36.54286972,36.5751973],1,null,null,{"interactive":true,"className":"","stroke":true,"color":"red","weight":5,"opacity":0.3,"fill":true,"fillColor":"red","fillOpacity":0.2},null,null,null,null,null,{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[-0.228685,-0.15185806],"lng":[36.52849996,36.61649612]}},"evals":[],"jsHooks":[]}</script>

Further readings

About

Handling vegetation-plot data sets

Resources

Packages

No packages published

Languages