correlogram: Correlogram

View source: R/correlogram.R

correlogramR Documentation

Correlogram

Description

Calculates and plots a correlogram

Usage

correlogram(x, v, dist = 5000, ns = 99, ...)

Arguments

x

A sf POINT object

v

Test variable in x

dist

Distance of correlation lags, if latlong=TRUE units are great circle in kilometers

ns

Number of simulations to derive simulation envelope

...

Arguments passed to cor ('pearson', 'kendall' or 'spearman')

Value

Plot of correlogram and a list object containing:

  • autocorrelation is a data.frame object with the following components

  • autocorrelation - Autocorrelation value for each distance lag

  • dist - Value of distance lag

  • lci - Lower confidence interval (p=0.025)

  • uci - Upper confidence interval (p=0.975)

  • CorrPlot recordedplot object to recall plot

Author(s)

Jeffrey S. Evans jeffrey_evans@tnc.org

Examples

library(sf)
if(require(sp, quietly = TRUE)) {
  data(meuse, package = "sp")
  meuse <- st_as_sf(meuse, coords = c("x", "y"), crs = 28992, 
                    agr = "constant")
}

zinc.cg <- correlogram(x = meuse, v = meuse$zinc, dist = 250, ns = 9)


spatialEco documentation built on Nov. 18, 2023, 1:13 a.m.