recBySpp: Observations by species or records-by-species matrix

View source: R/biodiversityFunctions.R

recBySppR Documentation

Observations by species or records-by-species matrix

Description

This function prepares the organised data into a "records-by-species" matrix summarizing the number of observations (records) per species in the shape required by the functions from the KnowBR package for calculating 'completeness'.

Usage

recBySpp(x, format = "A", location = "coordinates")

Arguments

x

an object of class ‘OrganizedBirds’ (organised BIRDS Spatial Dataframe).

format

the type of matrix to return: type 'A' where each row is a combination of species, location (unique coordinates or visits' ID) and count, or 'B' where each row is a location, each column a species, and the elements of the matrix the counts

location

the uniqueness of the position given by the coordinates or the visits' ID

Value

a data.frame with a record-by-species matrix

References

Lobo et al. (2018) <https://doi.org/10.1016/j.ecolind.2018.03.077>

See Also

communityMatrix

Examples


grid <- makeGrid(searchPolygon, gridSize = 10)
OB <- organizeBirds(bombusObsShort, sppCol = "scientificName",
                    taxonRankCol = "taxonRank", taxonRank = "SPECIES",
                    simplifySppName = TRUE)
RxS <- recBySpp(OB)


Greensway/BIRDS documentation built on Oct. 19, 2023, 2:35 a.m.