climateEnvelope: Create a climate envelope plot of one or multiple species

View source: R/climateEnvelope.R

climateEnvelopeR Documentation

Create a climate envelope plot of one or multiple species

Description

Read a SpatialPointsDataFrame or dataframe with species location data and return a plot with the current and future climate envelope

Usage

climateEnvelope(
  data,
  climate = "worldclim",
  model = "MI",
  res = 10,
  lon = "x",
  lat = "y",
  rcp = 60,
  year = 50,
  extent = NA,
  method = "MCP",
  path = ""
)

Arguments

data

RasterLayer, SpatialPointsDataFrame or data.frame

climate

character. One of Worldclim, Chelsa or ISIMIP2b

model

character. Should be one of "AC", "BC", "CC", "CE", "CN", "GF", "GD", "GS", "HD", "HG", "HE", "IN", "IP", "MI", "MR", "MC", "MP", "MG", or "NO".

res

Valid resolutions are 0.5, 2.5, 5, and 10 (minutes of a degree). In the case of res=0.5, you must also provide a lon and lat argument for a tile; for the lower resolutions global data will be downloaded.

lon

Longitude argument for a tile, only applicable if res = 0.5

lat

Latitude argument for a tile, only applicable if res = 0.5

rcp

character. RCP scenario for future climate data, should be one of 26, 45, 60 or 85.

year

numeric. Year of future climate scenario, should be one of 50, 70.

extent

specify extent of area considered

method

character. One of CH (convex hull) or MCP (minimum convex polygon) or MFB (personal method).

path

Character. Path name indicating where to store the data. Default is the current working directory.

Value

ggplot2 object

Examples

## Not run: 
library(climateNiche)
data(Passer_domesticus)

climateEnvelope(data=Passer_domesticus, method="MCP")

climateEnvelope(data=Passer_domesticus, method="CH")

climateEnvelope(data=Passer_domesticus, method="MFB")

## End(Not run)

RS-eco/climateNiche documentation built on Feb. 21, 2023, 5:25 a.m.