### Example with two loci, each with two alleles ###
# Definition of the genome
DL <- list(dl = c("A", "a"))
HL <- list(hl = c("B", "b"))
genomeObj <- setGenome(listHapLoci = HL, listDipLoci = DL)
# The mutation function allows each transition from one allele to
# another to be defined individually, to produce the mutation matrix
# as follows:
mutMatrixObj <- setMutationMatrix(genomeObj,
mutations = list(
mutation(from = "A", to = "a", rate = 0.1),
mutation(from = "B", to = "b", rate = 0.1)
)
)
Run the code above in your browser using DataLab