Utility functions to perform simple computations, transformations, formatting etc.
make.dummy(fact)dummy2factor(x)
Hill.N2(df, margin=2)
site.summ(y, max.cut=c(2, 5, 10, 20))
sp.summ(y, n.cut=c(5, 10, 20))
make.dummy
returns a matrix of dummay variables. dummy2factor
returns a factor.
Hill.N2
returns a numeric vector of N2 values.
sp.summ
returns a matrix with columns for the number of occurences, Hill's N2 and maximum abundance of each species, and the number of occurences at abundance greater than the cut levels given in n.cut
.
sam.summ
returns a matrix with columns for the number of taxa, Hill's N2, maximum value and site total of each site (sample), and the number of taxa in each site with abundance greater than the cut levels given in max.cut
.
a factor to convert to a matrix of dummy variables.
a matrix or data frame of dummy variables to convert to a factor.
a data frame of species abundance data.
margin to calculate over: 1 = by rows, 2 = by columns.
data frame or matrix of species by sites data.
cut levels of abundance for species summary (see below).
cut levels of occurence for species sumamry.
Steve Juggins
Function make.dummy
converts a factor into a matrix of dummy (1/0) variables. dummy2factor
converts a matrix or data frame of dummy variables into a factor.
Function Hill.N2
returns Hill's N2 values for species or samples for a given species by sites dataset (Hill 1973).
Hill, M.O. (1973) Diversity and evenness: a unifying notation and its consequences. Ecology, 54, 427-432.