Usage
simdata(nindiv, coord.indiv, coord.lim=c(0,1,0,1), npop, rate, number.nuclei, coord.nuclei, color.nuclei, allele.numbers, sim.gen=FALSE, IBD=TRUE, model="stable", alpha=1, beta=1, gamma=1.8, sim.quanti=FALSE, nquanti.var, mean.quanti, sd.quanti, seed.coord, seed.tess, seed.freq, give.tess.grid=FALSE, give.freq.grid=FALSE, npix, comp.Fst=FALSE, comp.Dsigma2=FALSE, comp.diff=FALSE, width, plot.pairs.borders=FALSE)
Arguments
nindiv
Number of indivuals
coord.indiv
Coordinates of the individuals
coord.lim
Limits of the geographical domain. The domain is
supposed to be rectangular and the limits are given as (abs min, abs
max, ord min, ord max)
npop
Number of Populations
rate
Rate of the Poisson process governing the hidden tessellation
number.nuclei
Number of nuclei in the tessellation (if given,
then rate
is ignored)
coord.nuclei
Coordinates of the nuclei (the number of
coordinates of the nuclei
given here as a matrix has to comply with number.nuclei
)
color.nuclei
Population membeship of the nuclei: a vector of
integer of length number of nuclei
whose values are between 1
and npop
sim.gen
Logical to say whether genetic data should be simulated
allele.numbers
A vector giving the number of alleles observed at
each locus
IBD
Logical. If TRUE, then the allele frequencies are simulated
according to an IBD model. If FALSE, panmixia is assumed.
model
Model of spatial covariance function used for the
underlying Gaussian fields (see documentation of package
RandomFields
for details)
alpha
Parameter of the spatial Dirichlet vector field
of frequencies (a positive real)
beta
Scale parameter of the spatial covariance function used for the
underlying Gaussian fields. A positive real number (see documentation of package
RandomFields
for details)
gamma
Smoothing parameter of spatial covariance function used for the
underlying Gaussian fields. (see documentation of package
RandomFields
for details)
sim.quanti
Logical to say whether quantitative data should be
simulated
nquanti.var
Number of quantitative variables to be simulated
mean.quanti
Mean of the quantitative variables in the various
groups. A matrix with npop
lines and nvar.quant
columns
sd.quanti
Standard deviation of the quantitative variables in
the various groups.
A matrix with npop
lines and nvar.quant
columns
seed.coord
Random seed to initialise the simulation of the
coordinates
(mostly for debugging)
seed.tess
Random seed to initialise the simulation of the
tessellation (mostly for debugging)
seed.freq
Random seed to initialise the simulation of the
frequencies (mostly for debugging)
give.freq.grid
Logical to tell whether frequencies on a grid are
also returned
give.tess.grid
Logical to tell whether population memberships of pixels on a grid are also returned
npix
A vector of two integers telling how many horizontal and
vertical pixel should contain the grid for the graphical
representations
comp.Fst
Logical to tell whether Fst, Fis and Fit should be
computed
comp.Dsigma2
Logical to tell whether IBD index Dsgma2 should be
computed
comp.diff
Logical to tell whether the local differentiation across the barriers
should be computed
width
Real number specifying the width around the barrier in
the computation of its local differentiation
plot.pairs.borders
Logical to tell whether the pairs of
individuals coming into the computation of the differentiation of the barriers
should be plotted