library(sf)
library(mapview)
bci<-st_read("BCI.kml")
## Reading layer `BCI' from data source `/home/rstudio/webpages/applied_biogeography/assignment2019/BCI.kml' using driver `LIBKML'
## Simple feature collection with 50 features and 11 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: -79.85549 ymin: 9.149372 xmax: -79.84728 ymax: 9.153015
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
mapview(bci)
library(vegan)
library(vegan)
library(tidyverse)
data(BCI)
bci<-data.frame(site=1:50,BCI)
bci[bci==0]<-NA
bci %>% gather(species,count,-1,na.rm=TRUE) -> bci2
DT::datatable(bci2)
vegan::specnumber(BCI)
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
## 93 84 90 94 101 85 82 88 90 94 87 84 93 98 93 93 93 89
## 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
## 109 100 99 91 99 95 105 91 99 85 86 97 77 88 86 92 83 92
## 37 38 39 40 41 42 43 44 45 46 47 48 49 50
## 88 82 84 80 102 87 86 81 81 86 102 91 91 93
plot(vegan::specaccum(BCI))
## Warning in cor(x > 0): the standard deviation is zero