R/SCov.R

Defines functions `SCov`

`SCov` <- function(X, location=NULL, na.action=na.fail)
{ 
 X <- na.action(X)
 if(is.function(location)) location<-location(X)
 if(is.null(location)) location<-spat.median(X)
 X<-sweep(X, 2, location)  
 d<-dim(X)
 matrix(.C("sum_of_sign_outers", as.double(X),as.integer(d), res=double(d[2]^2),PACKAGE="SpatialNP")$res,ncol=d[2],byrow=T)/dim(X)[1]
}

Try the SpatialNP package in your browser

Any scripts or data that you put into this service are public.

SpatialNP documentation built on March 18, 2022, 8:02 p.m.