occData: Input occurrence data

Description Usage Arguments Value Examples

View source: R/occData.R

Description

Prepares user provided georeferenced biological data for the models

Usage

1
2
3
4
5
6
7
occData(
  occ_table,
  species = "Species",
  longitude = "Longitude",
  latitude = "Latitude",
  occurrence = "occurrence"
)

Arguments

occ_table

table containing latitude and longitude

species

col.name containing the species information

longitude

col.name containing the longitude information

latitude

col.name containing the latitude information

occurrence

col.name informing whether each entry is a presence or absence. Values must be TRUE or FALSE.

Value

This function standardises the user provided georeferenced biological data to be fed into the models.

Examples

1
2
3
4
5
6
7
8
9
# Create a data.frame containing species names and coordinates

test_data <- data.frame(sps=rep("Equus acephalus",10),
             lon=c(-43.2,-58.4,-56,-44,-54.5,-57.4,-60.1,-68.5,-71.3,-47.5),
             lat=c(-22.9,-34.6,-34.8,-20,-25.5,-25.2,-3,-32.5,-41.1,-15.5),
             gender=rep("female",10),head_size=rep("headless individual"),
             occ=c(TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE))

sps_occurrence <- occData(test_data,"sps","lon","lat","occ")

EduardoArle/speciesRanges documentation built on Feb. 2, 2022, 5:14 p.m.