R/crossmemb.R

Defines functions crossmemb

Documented in crossmemb

crossmemb<-function(x,y,relativize=TRUE) {
	if(inherits(x, "vegclust") || inherits(x, "vegclass")) x = x$memb
	if(inherits(y, "vegclust") || inherits(y, "vegclass")) y = y$memb
	c=t(x)%*%as.matrix(y)
	if(relativize) c = sweep(c,1,colSums(x),"/")
    return(c)
}

Try the vegclust package in your browser

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

vegclust documentation built on Aug. 25, 2022, 9:08 a.m.