resamp.3t: randomizing a community phylogenetics matrix: '3t' of Hardy...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/dataResampling.R

Description

resamp.3t is used for resampling data within a community dataset

Usage

1
resamp.3t(obj, dmat=NULL)

Arguments

obj

a community dataset in spacodiR format (see as.spacodi)

dmat

an optional dataframe of distances between plots; row names and column names should be identical

Details

A resampling procedure for a species-by-plots matrix, where observed abundances within species are shuffled to adjacent plots. This procedure thus assumes meaningful arrangement of plots in space. If a distance matrix is supplied, the likelihood of shuffling to a particular plot is proportional to the distance between the plots.

Value

A shuffled dataset

Author(s)

Jonathan Eastman

References

HARDY OJ. 2008. Testing the spatial phylogenetic structure of local communities: statistical performances of different null models and test statistics on a locally neutral community. Journal of Ecology 96:914-926.

See Also

spacodi.by.nodes for permutation tests of community diversity and additional randomization methods; see spacodi.calc for the main underlying function; randomizeMatrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# define a community dataset
data(sp.example)
attach(sp.example)
spl

# define a distance matrix
foo <- matrix(runif((ncol(spl)->ss)^2,0,100),ss,ss)
foo[upper.tri(foo)] <- foo[lower.tri(foo)]
diag(foo) <- 0
dmat <- as.data.frame(foo)
row.names(dmat) <- names(spl)
names(dmat) <- row.names(dmat)


# shuffle dataset
resamp.3t(obj=spl, dmat=dmat) 
spl ## comparison with original

spacodiR documentation built on May 2, 2019, 8:26 a.m.

Related to resamp.3t in spacodiR...