Learn R Programming

ordiBreadth (version 1.0)

null.breadth: null.breadth

Description

This function calculates the null expectation of host breadth if herbivores sample diet items randomly.

Usage

null.breadth(dat, dist.method = "jaccard", rep = 100, quantiles = c(0.025, 0.975), scaled = FALSE)

Arguments

dat
A matrix of diet associations. Rows are herbivores and columns are diet items.
dist.method
Dissimilarity index passed on to vegdist in the 'vegan' package.
rep
The number of permutations to generate a null distribution
quantiles
A vector length of two indicating the lower and upper quantiles to report for the null distribution.
scaled
A logical indicating whether to report the scaled ordinated host breadth.

Value

An array show the lower and upper quantiles of the null distribution for each taxonomic richness

References

Fordyce, J.A., C.C. Nice, C.A. Hamm, & M.L. Forister. Quantifying diet breadth through ordination of host association. Ecology

Examples

Run this code
testdata<-	
	c(		
			0,0,0,0,1,0,0,0,0,0,
			0,0,0,0,0,0,1,1,0,0,
			1,1,1,0,0,0,0,0,0,0,
			0,0,0,0,1,1,0,1,0,1,
			1,1,1,0,0,0,1,0,0,0,
			1,1,0,0,1,0,1,0,0,0,
			0,0,0,1,0,0,1,0,1,1,
			1,0,1,0,1,1,0,0,0,1, 
			1,1,0,0,1,0,0,1,1,1,
			1,1,1,0,1,1,0,1,1,1) 


dat<-array(dim=c(10,10),data=testdata)
dat<-t(dat)
colnames(dat)<-paste("",LETTERS[1:10],sep="")
rownames(dat)<-paste("bug",1:10,sep="")

null.breadth(dat)

Run the code above in your browser using DataLab