grid_diversity: Function to grid geolocated, taxonomically-defined...

Description Usage Arguments Value

View source: R/grid_diversity.R

Description

Data portals such as OBIS typically return tables of geolocated observations upon requests. When combined with packages such as taxizesoap the taxonomy of all occurring species can be added. From there a common task is to map the number of unique species/genus/family (or other taxonomic group) on a lattice.

Usage

1
2
grid_diversity(mydata, taxonomic_level, myresolution = 0.5, myzoom = 7,
  lat_centre = NULL, lon_centre = NULL)

Arguments

mydata

is an R data.frame. It contains two columns that must be named lat and lon, lon corresponding to each observations. mydata must have the right column names for the function to work. See example on how to do that.

taxonomic_level

is the taxonomic resolution for gridding. Possible choices are kingdom, phylum, class, order, family, genus and species

myresolution

is the size of the cells the data is to be aggregated over

myzoom

is the zoom to be applied to plot the gridded data on ggmap map

lat_centre

is the user-defined latitude the map will be centred on. Default to mean latitude of observations.

lon_centre

is the user-defined longitude the map will be centred on. Default to mean longitude of observations.

Value

grid_diversity returns a data frame containing the number of unique taxonomic group per cell. The taxonomic resolution is defined by the user.


remsamp/Rmerp_public documentation built on May 3, 2019, 4:07 p.m.