spatialWeightMatrix: spatialWeightMatrix

View source: R/build.R

spatialWeightMatrixR Documentation

spatialWeightMatrix

Description

Create weight matrix for spatial data

Usage

spatialWeightMatrix(x, span = NULL)

Arguments

x

a matrix with rows corresponding to cells and columns corresponding to dimensions to calculate Euclidean distance

span

proportion of samples to include on either side, default is 13/(number of rows in 'x'), corresponding roughly to points within a diamond shape distance away

Value

A weighted matrix

Examples


spat_x <- rnorm(50)
spat_y <- rnorm(50)
spat_coord <- cbind(spat_x, spat_y)
W <- spatialWeightMatrix(spat_coord)


shazanfar/scHOT documentation built on June 29, 2023, 5:29 p.m.