Description Usage Format Source Examples
The genetic data of sim02
correspond to the first 100 individuals of the dataset sim01
but spatial coordinates have been modified so that the resulting pattern is clumped (See sim01
for details).
1 |
An object of class ggene
.
Leblois, R., A. Estoup and F. Rousset 2009. IBDSim: a computer program to simulate genotypic data under isolation by distance. Molecular Ecology Resources 9: 107-109.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(sim02)
# plot the spatial distribution of individuals
plot(sim02$coord[,1], sim02$coord[,2], asp=1)
# compute variogram
va <- svariog(X=sim02, uvec=distlag(dist=sim01$coord, dmin=1, distance.lag=1), plot=FALSE)
plot(va$svario$u, va$svario$v, xlab="distance", ylab="semivariance")
abline(h=va$Hhat, col="red", lty="dashed")
## Not run:
# compute statistical envelope
env <- randsvariog(var=va, X=sim02, nsim=30, bounds=c(0.025, 0.975), save.sim=FALSE)
# plot results
plot(env$svario$u, env$svario$v, ylim=range(env$env), xlab="distance", ylab="semi-variance")
abline(h=va$Hhat, col="red", lty="dashed")
points(env$svario$u, env$env[,1], type="l")
points(env$svario$u, env$env[,2], type="l")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.