wcvp_occ_mat {rWCVP}R Documentation

Generate occurrence matrix for taxa and areas

Description

Generate occurrence matrix for taxa and areas

Usage

wcvp_occ_mat(
  taxon = NULL,
  taxon_rank = c("species", "genus", "family", "order", "higher"),
  area_codes = NULL,
  native = TRUE,
  introduced = TRUE,
  extinct = TRUE,
  location_doubtful = TRUE,
  wcvp_names = NULL,
  wcvp_distributions = NULL
)

Arguments

taxon

Character. One or many taxa to be included. Defaults to NULL (all species)

taxon_rank

Character. One of "species", "genus", "family", "order" or "higher", giving the rank of the value/s in taxon. Must be specified unless taxon is NULL.

area_codes

Character. One or many WGSPRD level 3 region codes. Defaults to NULL (global).

native

Logical. Include species occurrences not flagged as introduced, extinct or doubtful? Defaults to TRUE.

introduced

Logical. Include species occurrences flagged as introduced? Defaults to TRUE.

extinct

Logical. Include species occurrences flagged as extinct? Defaults to TRUE.

location_doubtful

Logical. Include species occurrences flagged as location doubtful? Defaults to TRUE.

wcvp_names

A data frame of taxonomic names from WCVP version 7 or later. If NULL, names will be loaded from rWCVPdata::wcvp_names.

wcvp_distributions

A data frame of distributions from WCVP version 7 or later. If NULL, distributions will be loaded from rWCVPdata::wcvp_names.

Details

See here for an example of how this output can be formatted for publication.

Value

A data.frame containing the taxon_name and plant_name_id of all species that are present in the area, plus one variable for each WGSPRD level 3 region in area, with species presences marked as 1 and absences marked as 0.

Examples

 # this example requires 'rWCVPdata'
if(requireNamespace("rWCVPdata")){
wcvp_occ_mat(
  taxon = "Poa", taxon_rank = "genus",
  area = c("TAS", "VIC", "NSW"), introduced = FALSE
)
}



[Package rWCVP version 1.2.4 Index]