Learn R Programming

RClone (version 1.0.3)

edge_effect: Edge Effect

Description

edge_effect tests the occurrence of Edge Effect.

Usage

edge_effect(data1, coords = NULL, center = NULL, vecpop = NULL, nbrepeat = 1, 
		bar = FALSE, listMLL = NULL)

Arguments

data1

a Rclone table with one allele per column, haploid or diploid data.

coords

a table with coordinates of every units in data1.

center

a vector or a list of vectors, with c(x,y) coordinates of the centre of the sampling area.

vecpop

vector, option, vecpop indicates the population name of each unit of data1, if data1 contains several populations. If data1 contains only one population, leave vecpop = NULL.

nbrepeat

numeric, option, the number of repeats.

bar

logical, option, if TRUE, adds a progression bar.

listMLL

option, a custom list of MLL.

Value

a list (one population) or list of lists (several populations) with

  • results a table with Ee value, pvalue and the number of permutations.

  • simulations a vector of nbrepeat values of sim-Ee.

Details

The index of edge effect Ee estimates the effect of sampling (scheme and strategy) on genotypic richness estimation and in particular overestimation due to large clones sampled only once at the edge of the sampling area.

Ee is estimated as Ee=(Du-Da)/Da with Du average geographic distances between unique MLG/MLL and the centre, and Da between all sampling units and the centre.

As for the aggregation index Ac, coordinates of units are randomly permuted nbrepeat times to provide a upper p-value (Monte Carlo).

References

Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.

See Also

autocorrelation, clonal_sub and agg_index

Examples

Run this code
# NOT RUN {
data(posidonia)
data(coord_posidonia)

center1 <- c(40,10)
#Our sample quadra ranges from 0 to 80 and 0 to 20

edge_effect(posidonia, coords = coord_posidonia, center = center1, nbrepeat = 1000, 
	bar = TRUE)

#But if, for some reasons you don't know where the middle of the sampling 
##area is, you can try some of these:
center <- c(mean(coord_posidonia[,1]), mean(coord_posidonia[,2])) #or
center <- c(mean(c(min(coord_posidonia[,1]), max(coord_posidonia[,1]))), 
mean(c(min(coord_posidonia[,2]), max(coord_posidonia[,2])))) #or
center <- c((max(coord_posidonia[,1])-min(coord_posidonia[,1]))/2, 
(max(coord_posidonia[,2])-min(coord_posidonia[,2]))/2)
# }

Run the code above in your browser using DataLab