[Esm-commits] r37 - in pkg/ESM: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 21 11:52:10 CEST 2010


Author: timotheepoisot
Date: 2010-09-21 11:52:10 +0200 (Tue, 21 Sep 2010)
New Revision: 37

Added:
   pkg/ESM/R/.Rhistory
   pkg/ESM/R/null.R
   pkg/ESM/man/nullweb.Rd
Modified:
   pkg/ESM/DESCRIPTION
   pkg/ESM/R/functions.r
   pkg/ESM/R/graphics.r
   pkg/ESM/man/getspe.Rd
Log:
Rewriting of the getspe function, added the Bascompte et al 2003 null model

Modified: pkg/ESM/DESCRIPTION
===================================================================
--- pkg/ESM/DESCRIPTION	2010-08-29 11:59:20 UTC (rev 36)
+++ pkg/ESM/DESCRIPTION	2010-09-21 09:52:10 UTC (rev 37)
@@ -1,5 +1,5 @@
 Package: ESM
-Version: 1.2.0-06
+Version: 1.3.0-01
 Date: 2010-08-29
 Title: Ecological Specificity Measures
 Author: Timothee Poisot <tpoisot at um2.fr>

Added: pkg/ESM/R/.Rhistory
===================================================================
--- pkg/ESM/R/.Rhistory	                        (rev 0)
+++ pkg/ESM/R/.Rhistory	2010-09-21 09:52:10 UTC (rev 37)
@@ -0,0 +1,507 @@
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]#
+#
+get.PDI <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- sort(as.vector(fit),decreasing=TRUE)#
+	test <- fit[2:length(fit)]#
+	out <- sum(fit[1]-test)/length(test)#
+	return(out)#
+}#
+#
+get.RR <- function(pop)#
+{#
+	if(length(pop)==1){return(1)}#
+	Ni <- sum(pop>0)#
+	N <- length(pop)#
+	return(1-(Ni-1)/(N-1))#
+}#
+#
+get.HS <- function(pop,ifzero=1e-12)#
+{#
+	if(length(pop)==1){return(1)}#
+	partiel <- NULL#
+	pop <- as.vector(pop)#
+	pop[pop==0] <- ifzero#
+	for(i in 1:length(pop))#
+	{#
+		p <- pop[i]/sum(pop)#
+		partiel[i] <- p * log(p)#
+	}#
+	shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))#
+	return(1-shannon)#
+}#
+#
+get.SSI <- function(occup)#
+{#
+	if(length(occup)==1){return(1)}#
+	score <- NULL#
+	fit <- as.vector(occup)#
+	h <- sum(fit>0)#
+	H <- length(occup)#
+	SSI <- sqrt((H/h-1)/(H-1))#
+	return(SSI)#
+}#
+#
+pdi <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.PDI(m[i,])#
+	}#
+	return(spe)#
+}#
+#
+hs <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.HS(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+ssi <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.SSI(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+rr <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.RR(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+getspe <- function(mat,measure=pdi,...)#
+{#
+	if(max(mat)!=1){mat<-mat/max(mat)}#
+	out <- measure(as.matrix(mat),...)#
+	names(out) <- rownames(mat)#
+	return(out)#
+}#
+#
+cv		= function(d) sd(d)/mean(d)#
+last	= function(d) d[length(d)]#
+#
+scale = function(v,m=0,M=1)#
+{#
+	v <- v-min(v)#
+	v <- v/max(v)#
+	v <- v*(M-m)#
+	v <- v+m#
+	return(v)#
+}#
+#
+dmat = function(m,n=2)#
+{#
+	e <- (max(m)-min(m))/n#
+	cl <- seq(from=0,to=1,by=e)#
+	nm <- matrix(0,ncol=ncol(m),nrow=nrow(m))#
+	for(i in 1:(length(cl)-1))#
+	{#
+		nm[(cl[i]<m)&(m<=cl[(i+1)])] <- cl[i]#
+	}#
+	return(scale(nm,0,1))#
+}
+emptt()
+empty()
+M <- matrix(round(runif(1e6),0),1e3)
+empty(mat)
+M <- matrix(round(rbinom(1e6,1,0.35),0),1e3)
+dim(M)
+M
+M <- matrix(round(rbinom(1e6,1,0.05),0),1e3)
+dim(empty(M))
+empty(M)
+colSums(M)
+M <- matrix(round(rbinom(1e6,1,0.25),0),1e3)
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]#
+#
+pdi <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- sort(as.vector(fit),decreasing=TRUE)#
+	test <- fit[2:length(fit)]#
+	out <- sum(fit[1]-test)/length(test)#
+	return(out)#
+}#
+#
+get.RR <- function(pop)#
+{#
+	if(length(pop)==1){return(1)}#
+	Ni <- sum(pop>0)#
+	N <- length(pop)#
+	return(1-(Ni-1)/(N-1))#
+}#
+#
+get.HS <- function(pop,ifzero=1e-12)#
+{#
+	if(length(pop)==1){return(1)}#
+	partiel <- NULL#
+	pop <- as.vector(pop)#
+	pop[pop==0] <- ifzero#
+	for(i in 1:length(pop))#
+	{#
+		p <- pop[i]/sum(pop)#
+		partiel[i] <- p * log(p)#
+	}#
+	shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))#
+	return(1-shannon)#
+}#
+#
+get.SSI <- function(occup)#
+{#
+	if(length(occup)==1){return(1)}#
+	score <- NULL#
+	fit <- as.vector(occup)#
+	h <- sum(fit>0)#
+	H <- length(occup)#
+	SSI <- sqrt((H/h-1)/(H-1))#
+	return(SSI)#
+}#
+#
+hs <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.HS(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+ssi <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.SSI(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+rr <- function(m)#
+{#
+	spe <- vector('numeric',length=nrow(m))#
+	for(i in 1:nrow(m))#
+	{#
+		spe[i] <- get.RR(as.vector(as.numeric(m[i,])))#
+	}#
+	return(spe)#
+}#
+#
+getspe <- function(mat,measure=pdi,...)#
+{#
+	mat <- empty(mat)#
+	mat <- mat/max(mat)#
+	out <- unlist(apply(mat,1,measure,...))#
+	names(out) <- rownames(mat)#
+	return(out)#
+}#
+#
+cv		= function(d) sd(d)/mean(d)#
+last	= function(d) d[length(d)]#
+#
+scale = function(v,m=0,M=1)#
+{#
+	v <- v-min(v)#
+	v <- v/max(v)#
+	v <- v*(M-m)#
+	v <- v+m#
+	return(v)#
+}#
+#
+dmat = function(m,n=2)#
+{#
+	e <- (max(m)-min(m))/n#
+	cl <- seq(from=0,to=1,by=e)#
+	nm <- matrix(0,ncol=ncol(m),nrow=nrow(m))#
+	for(i in 1:(length(cl)-1))#
+	{#
+		nm[(cl[i]<m)&(m<=cl[(i+1)])] <- cl[i]#
+	}#
+	return(scale(nm,0,1))#
+}
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]#
+#
+pdi <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- sort(as.vector(fit),decreasing=TRUE)#
+	test <- fit[2:length(fit)]#
+	out <- sum(fit[1]-test)/length(test)#
+	return(out)#
+}#
+#
+rr <- function(pop)#
+{#
+	if(length(pop)==1){return(1)}#
+	Ni <- sum(pop>0)#
+	N <- length(pop)#
+	return(1-(Ni-1)/(N-1))#
+}#
+#
+hs <- function(pop,ifzero=1e-12)#
+{#
+	if(length(pop)==1){return(1)}#
+	partiel <- NULL#
+	pop <- as.vector(pop)#
+	pop[pop==0] <- ifzero#
+	for(i in 1:length(pop))#
+	{#
+		p <- pop[i]/sum(pop)#
+		partiel[i] <- p * log(p)#
+	}#
+	shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))#
+	return(1-shannon)#
+}#
+#
+ssi <- function(occup)#
+{#
+	if(length(occup)==1){return(1)}#
+	score <- NULL#
+	fit <- as.vector(occup)#
+	h <- sum(fit>0)#
+	H <- length(occup)#
+	SSI <- sqrt((H/h-1)/(H-1))#
+	return(SSI)#
+}#
+#
+getspe <- function(mat,measure=pdi,...)#
+{#
+	mat <- empty(mat)#
+	mat <- mat/max(mat)#
+	out <- unlist(apply(mat,1,measure,...))#
+	names(out) <- rownames(mat)#
+	return(out)#
+}#
+#
+cv		= function(d) sd(d)/mean(d)#
+last	= function(d) d[length(d)]#
+#
+scale = function(v,m=0,M=1)#
+{#
+	v <- v-min(v)#
+	v <- v/max(v)#
+	v <- v*(M-m)#
+	v <- v+m#
+	return(v)#
+}#
+#
+dmat = function(m,n=2)#
+{#
+	e <- (max(m)-min(m))/n#
+	cl <- seq(from=0,to=1,by=e)#
+	nm <- matrix(0,ncol=ncol(m),nrow=nrow(m))#
+	for(i in 1:(length(cl)-1))#
+	{#
+		nm[(cl[i]<m)&(m<=cl[(i+1)])] <- cl[i]#
+	}#
+	return(scale(nm,0,1))#
+}
+getspe(M,ssi)
+system.time(getspe(M))
+system.time(getspe(M,rr))
+system.time(getspe(M,ssi))
+plot(getspe(M,pdi),getspe(M,rr))
+plot(getspe(M,pdi),getspe(M,ssi))
+cv(getspe(M))
+cv(getspe(M,rr))
+cv(getspe(M,ssi))
+cv(getspe(M,hs))
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]#
+#
+pdi <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- sort(as.vector(fit),decreasing=TRUE)#
+	test <- fit[2:length(fit)]#
+	out <- sum(fit[1]-test)/length(test)#
+	return(out)#
+}#
+#
+rr <- function(pop)#
+{#
+	if(length(pop)==1){return(1)}#
+	Ni <- sum(pop>0)#
+	N <- length(pop)#
+	return(1-(Ni-1)/(N-1))#
+}#
+#
+hs <- function(pop,ifzero=1e-12)#
+{#
+	if(length(pop)==1){return(1)}#
+#	partiel <- NULL#
+	pop <- as.vector(pop)#
+	pop[pop==0] <- ifzero#
+	pp <- pop/sum(pop)#
+	partiel <- pp * log(pp)#
+#	for(i in 1:length(pop))#
+#	{#
+#		p <- pop[i]/sum(pop)#
+#		partiel[i] <- p * log(p)#
+#	}#
+	shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))#
+	return(1-shannon)#
+}#
+#
+ssi <- function(occup)#
+{#
+	if(length(occup)==1){return(1)}#
+	score <- NULL#
+	fit <- as.vector(occup)#
+	h <- sum(fit>0)#
+	H <- length(occup)#
+	SSI <- sqrt((H/h-1)/(H-1))#
+	return(SSI)#
+}#
+#
+getspe <- function(mat,measure=pdi,...)#
+{#
+	mat <- empty(mat)#
+	mat <- mat/max(mat)#
+	out <- unlist(apply(mat,1,measure,...))#
+	names(out) <- rownames(mat)#
+	return(out)#
+}#
+#
+cv		= function(d) sd(d)/mean(d)#
+last	= function(d) d[length(d)]#
+#
+scale = function(v,m=0,M=1)#
+{#
+	v <- v-min(v)#
+	v <- v/max(v)#
+	v <- v*(M-m)#
+	v <- v+m#
+	return(v)#
+}#
+#
+dmat = function(m,n=2)#
+{#
+	e <- (max(m)-min(m))/n#
+	cl <- seq(from=0,to=1,by=e)#
+	nm <- matrix(0,ncol=ncol(m),nrow=nrow(m))#
+	for(i in 1:(length(cl)-1))#
+	{#
+		nm[(cl[i]<m)&(m<=cl[(i+1)])] <- cl[i]#
+	}#
+	return(scale(nm,0,1))#
+}
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]#
+#
+pdi <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- sort(as.vector(fit),decreasing=TRUE)#
+	test <- fit[2:length(fit)]#
+	out <- sum(fit[1]-test)/length(test)#
+	return(out)#
+}#
+#
+rr <- function(pop)#
+{#
+	if(length(pop)==1){return(1)}#
+	Ni <- sum(pop>0)#
+	N <- length(pop)#
+	return(1-(Ni-1)/(N-1))#
+}#
+#
+hs <- function(fit,ifzero=1e-12)#
+{#
+	if(length(fit)==1){return(1)}#
+	fit <- as.vector(fit)#
+	fit[fit==0] <- ifzero#
+	pp <- fit/sum(fit)#
+	partiel <- pp * log(pp)#
+	shannon <- ifelse(length(fit)<=1,0,-sum(partiel) / log(length(fit)))#
+	return(1-shannon)#
+}#
+#
+ssi <- function(fit)#
+{#
+	if(length(fit)==1){return(1)}#
+	score <- NULL#
+	fit <- as.vector(fit)#
+	h <- sum(fit>0)#
+	H <- length(fit)#
+	SSI <- sqrt((H/h-1)/(H-1))#
+	return(SSI)#
+}#
+#
+getspe <- function(mat,measure=pdi,...)#
+{#
+	mat <- empty(mat)#
+	mat <- mat/max(mat)#
+	out <- unlist(apply(mat,1,measure,...))#
+	names(out) <- rownames(mat)#
+	return(out)#
+}#
+#
+cv		= function(d) sd(d)/mean(d)#
+last	= function(d) d[length(d)]#
+#
+scale = function(v,m=0,M=1)#
+{#
+	v <- v-min(v)#
+	v <- v/max(v)#
+	v <- v*(M-m)#
+	v <- v+m#
+	return(v)#
+}#
+#
+dmat = function(m,n=2)#
+{#
+	e <- (max(m)-min(m))/n#
+	cl <- seq(from=0,to=1,by=e)#
+	nm <- matrix(0,ncol=ncol(m),nrow=nrow(m))#
+	for(i in 1:(length(cl)-1))#
+	{#
+		nm[(cl[i]<m)&(m<=cl[(i+1)])] <- cl[i]#
+	}#
+	return(scale(nm,0,1))#
+}
+system.time(getspe(M,hs))
+rownames(M) <- c(1:1000)
+getspe(M,pdi)
+boxplot(getspe(M,pdi))
+hist(getspe(M,pdi))
+hist(getspe(M,rr))
+hist(getspe(M,ssi))
+hist(getspe(M,hs))
+setwd('/Users/Tim/esm/pkg/ESM/R')
+nullweb = function(ref)#
+{#
+	ref <- empty(ref)#
+	ref[ref>0] <- 1#
+	margin <- ifelse(ncol(ref)<nrow(ref),2,1)#
+	currentweb <- matrix(0,ncol=ncol(ref),nrow=nrow(ref))#
+	pc <- colMeans(ref)#
+	pr <- rowMeans(ref)#
+	if(margin==2)#
+	{#
+		for(i in 1:ncol(ref))#
+		{#
+			currentweb[,i] <- (pc[i]+pr)/2#
+		}#
+	} else {#
+		for(i in 1:nrow(ref))#
+		{#
+			currentweb[i,] <- (pr[i]+pc)/2#
+		}#
+	}#
+	return(apply(currentweb,margin,function(x)rbinom(length(x),1,x)))#
+}#
+#
+nullreps = function(ref,rep) replicate(rep,nullweb(ref),FALSE)

Modified: pkg/ESM/R/functions.r
===================================================================
--- pkg/ESM/R/functions.r	2010-08-29 11:59:20 UTC (rev 36)
+++ pkg/ESM/R/functions.r	2010-09-21 09:52:10 UTC (rev 37)
@@ -1,4 +1,6 @@
-get.PDI <- function(fit)
+empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]
+
+pdi <- function(fit)
 {
 	if(length(fit)==1){return(1)}
 	fit <- sort(as.vector(fit),decreasing=TRUE)
@@ -7,84 +9,41 @@
 	return(out)
 }
 
-get.RR <- function(pop)
+rr <- function(fit)
 {
-	if(length(pop)==1){return(1)}
-	Ni <- sum(pop>0)
-	N <- length(pop)
+	if(length(fit)==1){return(1)}
+	Ni <- sum(fit>0)
+	N <- length(fit)
 	return(1-(Ni-1)/(N-1))
 }
 
-get.HS <- function(pop,ifzero=1e-12)
+hs <- function(fit,ifzero=1e-12)
 {
-	if(length(pop)==1){return(1)}
-	partiel <- NULL
-	pop <- as.vector(pop)
-	pop[pop==0] <- ifzero
-	for(i in 1:length(pop))
-	{
-		p <- pop[i]/sum(pop)
-		partiel[i] <- p * log(p)
-	}
-	shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))
+	if(length(fit)==1){return(1)}
+	fit <- as.vector(fit)
+	fit[fit==0] <- ifzero
+	pp <- fit/sum(fit)
+	partiel <- pp * log(pp)
+	shannon <- ifelse(length(fit)<=1,0,-sum(partiel) / log(length(fit)))
 	return(1-shannon)
 }
 
-get.SSI <- function(occup)
+ssi <- function(fit)
 {
-	if(length(occup)==1){return(1)}
+	if(length(fit)==1){return(1)}
 	score <- NULL
-	fit <- as.vector(occup)
+	fit <- as.vector(fit)
 	h <- sum(fit>0)
-	H <- length(occup)
+	H <- length(fit)
 	SSI <- sqrt((H/h-1)/(H-1))
 	return(SSI)
 }
 
-pdi <- function(m)
-{
-	spe <- vector('numeric',length=nrow(m))
-	for(i in 1:nrow(m))
-	{
-		spe[i] <- get.PDI(m[i,])
-	}
-	return(spe)
-}
-
-hs <- function(m)
-{
-	spe <- vector('numeric',length=nrow(m))
-	for(i in 1:nrow(m))
-	{
-		spe[i] <- get.HS(as.vector(as.numeric(m[i,])))
-	}
-	return(spe)
-}
-
-ssi <- function(m)
-{
-	spe <- vector('numeric',length=nrow(m))
-	for(i in 1:nrow(m))
-	{
-		spe[i] <- get.SSI(as.vector(as.numeric(m[i,])))
-	}
-	return(spe)
-}
-
-rr <- function(m)
-{
-	spe <- vector('numeric',length=nrow(m))
-	for(i in 1:nrow(m))
-	{
-		spe[i] <- get.RR(as.vector(as.numeric(m[i,])))
-	}
-	return(spe)
-}
-
 getspe <- function(mat,measure=pdi,...)
 {
-	if(max(mat)!=1){mat<-mat/max(mat)}
-	out <- measure(as.matrix(mat),...)
+	mat <- empty(mat)
+	mat <- mat/max(mat)
+	out <- unlist(apply(mat,1,measure,...))
 	names(out) <- rownames(mat)
 	return(out)
 }

Modified: pkg/ESM/R/graphics.r
===================================================================
--- pkg/ESM/R/graphics.r	2010-08-29 11:59:20 UTC (rev 36)
+++ pkg/ESM/R/graphics.r	2010-09-21 09:52:10 UTC (rev 37)
@@ -56,19 +56,17 @@
 		)
 }
 
-ViewMatrix = function(web,type='diagonal',nonull=TRUE,gr.lty=1,gr.col='lightgrey',no.fg='black',no.bg='black',...)
+ViewMatrix = function(web,type='diagonal',gr.lty=1,gr.col='lightgrey',no.fg='black',no.bg='black',...)
 {
+	web <- empty(web)
 	if(max(web)>1){web <- web/max(web)}
-	if(nonull){web<-web[(rowSums(web)>0),(colSums(web)>0)]}
 	## This is from bipartite
 	if (type == "diagonal") {
 		require(vegan)
-		web <- empty(web)
 		ca <- cca(web)
 		web <- web[order(summary(ca)$sites[, 1], decreasing = TRUE), order(summary(ca)$species[, 1], decreasing = TRUE)]
 	}
 	if (type == "nested") {
-		web <- empty(web)
 		web <- web[order(rowSums(web), decreasing = TRUE), order(colSums(web), decreasing = TRUE)]
 	}
 	## This is not from bipartite anymore

Added: pkg/ESM/R/null.R
===================================================================
--- pkg/ESM/R/null.R	                        (rev 0)
+++ pkg/ESM/R/null.R	2010-09-21 09:52:10 UTC (rev 37)
@@ -0,0 +1,24 @@
+nullweb = function(ref)
+{
+	ref <- empty(ref)
+	ref[ref>0] <- 1
+	margin <- ifelse(ncol(ref)<nrow(ref),2,1)
+	currentweb <- matrix(0,ncol=ncol(ref),nrow=nrow(ref))
+	pc <- colMeans(ref)
+	pr <- rowMeans(ref)
+	if(margin==2)
+	{
+		for(i in 1:ncol(ref))
+		{
+			currentweb[,i] <- (pc[i]+pr)/2
+		}
+	} else {
+		for(i in 1:nrow(ref))
+		{
+			currentweb[i,] <- (pr[i]+pc)/2
+		}
+	}
+	return(apply(currentweb,margin,function(x)rbinom(length(x),1,x)))
+}
+
+nullreps = function(ref,rep) replicate(rep,nullweb(ref),FALSE)
\ No newline at end of file

Modified: pkg/ESM/man/getspe.Rd
===================================================================
--- pkg/ESM/man/getspe.Rd	2010-08-29 11:59:20 UTC (rev 36)
+++ pkg/ESM/man/getspe.Rd	2010-09-21 09:52:10 UTC (rev 37)
@@ -4,7 +4,7 @@
 \title{Specificity}
 \description{Returns a vector containing the specificity of each organism}
 \usage{ 
-getspe(mat,measure=lsd)
+getspe(mat,measure=pdi)
 }
 
 \arguments{ 
@@ -16,7 +16,7 @@
 	\item{}{A vector with the specificity of each organism. Uses names if the matrix as such property.}
 }
  
-\details{Values of \kbd{measure} can be : \kbd{rr}, the classical resource range; \kbd{ssi}, the species specialization index; \kbd{lsd}, the Link Strength Difference index; \kbd{hs}, Shannon's entropy.}
+\details{Values of \kbd{measure} can be : \kbd{rr}, the classical resource range; \kbd{ssi}, the species specialization index; \kbd{pdi}, the Paired Differences Index; \kbd{hs}, Shannon's entropy.}
 
 \references{For PDI, and this package, cite : Poisot, T, Canard E, Mouquet N & Hochberg, M E "..." XXX.
 

Added: pkg/ESM/man/nullweb.Rd
===================================================================
--- pkg/ESM/man/nullweb.Rd	                        (rev 0)
+++ pkg/ESM/man/nullweb.Rd	2010-09-21 09:52:10 UTC (rev 37)
@@ -0,0 +1,22 @@
+\name{nullweb} 
+\Rdversion{1.1} 
+\alias{nullweb} 
+\title{Null model of binary interactions}
+\description{}
+\usage{ 
+nullweb(ref)
+}
+
+\arguments{ 
+\item{ref}{An interaction network} 
+}
+
+\value{
+	\item{}{A null interaction network}
+}
+ 
+\details{Based on Bascompte et coll. 2003 PNAS}
+
+\references{}
+
+\examples{}
\ No newline at end of file



More information about the Esm-commits mailing list