Description Usage Arguments Examples
Add a locus to a Rmetasim landscape object
1 2 3 4 | ## must be called AFTER integer, switch, and float params have been created
landscape.new.locus(rland,type=0,ploidy=1,
mutationrate=0,transmission=1,numalleles=2,
allelesize=50,frequencies=NULL, states = NULL)
|
rland |
partially created landscape object, required |
type |
(default=0) type of locus, 0=Infinite Allele mutation model (Integer), 1=Stepwise mutation model (Integer) state, 2=DNA base (variable length string state) |
ploidy |
(default=1) locus ploidy, 1 or 2 |
mutationrate |
(default=0) probability of mutation per generation, less than or equal to 1 |
transmission |
(default=1) 1=uniparental inheritance, 0=biparental inheritance |
numalleles |
(default=2) number of different alleles at the time of creation |
allelesize |
(default=50) length of DNA strings if type=2 |
frequencies |
(default=NULL) vector of frequencies for each allele, must be numalleles long and add up to 1, if NULL frequencies are equally distributed |
states |
States for each of the alleles specified. If NULL sequential numeric states used. |
1 2 3 4 5 6 7 8 9 10 11 | exampleland <- landscape.new.empty()
exampleland <- landscape.new.intparam(exampleland, s=2, h=2)
exampleland <- landscape.new.floatparam(exampleland)
exampleland <- landscape.new.switchparam(exampleland)
exampleland <- landscape.new.locus(exampleland,type=2,ploidy=2,
mutationrate=.001,numalleles=5,allelesize=100)
exampleland$loci
rm(exampleland)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.