paa: Population Aggregate Analysis

Description Usage Arguments Details Value Author(s) References Examples

Description

Conducts population aggregate analysis over a matrix of characters of interest.

Usage

1

Arguments

data

A data matrix with columns as characters and rows as individuals.

sppVector

The species vector. See sppVector.

Details

When used on DNA sequences, the function treats gaps as seperate characters.

Value

A matrix with species as rows and characters as columns. Cells give the character state of each species if fixed, or "poly" if the character is polymorphic.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

References

Sites, J. W. J., & Marshall, J. C. (2003). Delimiting species: a Renaissance issue in systematic biology. _Trends in Ecology and Evolution_ *18* (9), 462-470.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#Create some exemplar data
u <- sample(c(0,1), 16, replace=TRUE)
v <- rep(c(0,1), rep(8,2))
x <- rep(c(1,0), rep(8,2))
y <- sample(c(0,1), 16, replace=TRUE)
z <- rep(c(1,0), rep(8,2))

dat <- cbind(u,v,x,y,z)
popn <- rep(c("A","B", "C", "D"), rep(4,4))

paa(dat, popn)

#Use on DNA sequences
data(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
	function(x) paste(x[1], x[2], sep="_"))

paa(as.character(anoteropsis), anoSpp)

spider documentation built on May 2, 2019, 7:31 a.m.