calcMoran: Global Moran's I spatial correlation

View source: R/calcMoran.R

calcMoranR Documentation

Global Moran's I spatial correlation

Description

Uses function Moran.I from the ape package to calculate the global spatial correlation of a point process with weights.

Usage

calcMoran(x, scol, mcol, ...)

Arguments

x

a numeric matrix, with rows corresponding to objects' positions and columns as spatial coordinates.

scol

a numeric scalar or vector that prescribes column numbers with spatial coordinates.

mcol

a numeric scalar that prescribes a column number with the measurement.

...

additional parameters passed to ape::Moran.I

Value

a list with observed, expected, sd, and p-value

Examples

library(ARCOS)
ARCOS::calcMoran(cbind(runif(100), runif(100), rnorm(100)), scol = c(1,2), mcol = 3)

dmattek/ARCOS documentation built on Dec. 5, 2024, 11:02 p.m.