lets.rangesize: Compute species' geographic range sizes

Description Usage Arguments Value Author(s) Examples

View source: R/lets_rangesize.R

Description

This function calculates species' range sizes from a PresenceAbsence object or directly from the species' shapefiles.

Usage

1
2
3
4
5
6
lets.rangesize(
  x,
  species_name = x@data[, 1],
  coordinates = "geographic",
  units = "cell"
)

Arguments

x

A PresenceAbsence object or an SpatialPolygonsDataFrame.

species_name

Species names in the same order as in the SpatialPolygonsDataFrame (only needed if x is a SpatialPolygonsDataFrame).

coordinates

"geographical" or "planar". Indicate wheter the shapefile has geographical or planar coordinates(only needed if x is a SpatialPolygonsDataFrame).

units

"cell" or "squaremeter". Indicate if the size units wanted are in number of cells occupied or in square meters(only needed if x is a PresenceAbsence object).

Value

The result is a matrix with the range size of each species. If the range size accounts for the earth curvature (Yes or No) or its size unit may differ for each argument combination:

1) SpatialPolygonsDataFrame & geographical = Square meters. Yes.

2) SpatialPolygonsDataFrame & planar = same units as the coordinates. No.

3) PresenceAbsence & cell = number of cells. No.

4) PresenceAbsence & squaremeter = Square meters. Yes.

Author(s)

Bruno Vilela

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# SpatialPolygonsDataFrame & geographical
data(Phyllomedusa)  
rangesize <- lets.rangesize(x = Phyllomedusa, 
                            coordinates = "geographic")

# SpatialPolygonsDataFrame & planar
rangesize2 <- lets.rangesize(x = Phyllomedusa, 
                             coordinates = "planar")

# PresenceAbsence & cell
data(PAM)  
rangesize3 <- lets.rangesize(x = PAM, 
                             units = "cell")

# PresenceAbsence & squaremeter
rangesize4 <- lets.rangesize(x = PAM,
                             units = "squaremeter")

## End(Not run)

letsR documentation built on Oct. 27, 2020, 1:07 a.m.