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)
}
emf-creaf/vegclust documentation built on July 27, 2024, 7:32 a.m.