cdb_check_species {Rcompadre} | R Documentation |
Check whether a COM(P)ADRE database contains one or more species of interest
Description
Takes a vector of species names and checks whether those species are
represented within a CompadreDB object. It outputs either a data frame
depicting the species of interest and whether they occur in the database
(TRUE/FALSE), or, if return_db == TRUE
, a CompadreDB object subset to
the species of interest.
Usage
cdb_check_species(cdb, species, return_db = FALSE)
Arguments
cdb |
A CompadreDB object |
species |
Character vector of binomial species names, with the genus and
specific epithet separated by either an underscore or a space (e.g.
|
return_db |
Logical argument indicating whether a database should be returned |
Value
If return_db == FALSE
, returns a data frame with a column of
species names and a column indicating whether a species occurs in the
database. If return_db == TRUE
, returns a subset of cdb
containing only those species within argument species
.
Author(s)
Danny Buss <dlb50@cam.ac.uk>
Owen R. Jones <jones@biology.sdu.dk>
Rob Salguero-Gómez <rob.salguero@zoo.ox.ac.uk>
Patrick Barks <patrick.barks@gmail.com>
See Also
Other data checking:
cdb_collapse()
,
cdb_compare()
,
cdb_flag()
,
mpm_methods
Examples
species <- c("Primula vulgaris", "Trillium ovatum", "Homo sapiens")
cdb_check_species(Compadre, species)
CompadreSubset <- cdb_check_species(Compadre, species, return_db = TRUE)