extractStatistics: Extract comparative statistics from two rasterlayer surfaces.

View source: R/extractStatistics.R

extractStatisticsR Documentation

Extract comparative statistics from two rasterlayer surfaces.

Description

Extract metrics of surface equivalency, ellipse overlap, ellipse centroid bearing and distance.

Usage

extractStatistics(
  rast1,
  rast2,
  rastnames = c("Summer", "Winter"),
  species,
  myEllipses = NULL,
  csvSavePath = FALSE,
  prop_points = 0.5,
  ...
)

Arguments

rast1

First input rasterLayer

rast2

Second input rasterLayer

rastnames

Character vector of layerNames to be compared (defaults to "Summer" and "Winter" for rast1 and rast2 respectively)

species

Character vector of species, name of subdirectory where results are (optionally) saved.

myEllipses

List output of 'makeDataEllipse' function. If not provided, calculations to fit dataEllipse will be rerun. Arguments for makeDataEllipse function should then be provided.

csvSavePath

Optional file path to save csv object to.

prop_points

Proportion of the points sampled from the surface to be included in ellipses drawn

...

Any additional arguments to be included in the output data.frame

Details

RasterLayers must have identical resolutions and extents. Schoener's D assumes surfaces each sum to 1.

Value

A data.frame containing species name, layerNames to be compared (defaults to "Summer" and "Winter" for rast1 and rast2 respectively), metrics of surface equivalency, ellipse areas, ratio of ellipse areas, percent of ellipse intersected, centroid latitude and longitude for each ellipse, and distance and bearing between each centroid.

See Also

makeDataEllipse

surfaceEquivalency


cjcampbell/SDMetrics documentation built on Oct. 2, 2022, 10:14 a.m.