R/crossmemb.R

Defines functions crossmemb

Documented in crossmemb

crossmemb<-function(x,y,relativize=TRUE) {
	if(class(x)=="vegclust" || class(x)=="vegclass") x = x$memb
	if(class(y)=="vegclust" || class(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 May 29, 2018, 9:04 a.m.