Description Usage Arguments Value Examples
View source: R/generate_selected_mutation.R
Generates nb_rand_mut
mutants and select nb_mut
among them according
to their selection coefficient and returns their phenotypic effects.
1 2 | generate_selected_mutation(nb_mut, n, lambda, maxfitness, pheno_wt,
alpha = 1/2, Q = 2, m = n, nb_mut_rand = 10^4)
|
nb_mut |
A natural number. Number of mutations in the output. |
n |
A natural number. Number of dimensions of the phenotypic space in which the random mutations are drawn. |
lambda |
A positive real number. Variance of the effect of mutations on phenotype per phenotypic dimension. |
maxfitness |
A real number. The maximum fitness in the landscape. The
fitness at the phenotypic optimum ( |
pheno_wt |
A vector of real numbers. Phenotypic coordinates of the wild-type.
Its length must be equal to the number of columns of |
alpha |
A strictly positive real number. Scaling factor for the fitness function. Default=1/2 in the cannonical FGM with a quadratic fitness function. |
Q |
A strictly positive number. "Shape" of the fitness function. Default=2 in the cannonical FGM with a quadratic fitness function. |
m |
A natural number inferior to |
nb_mut_rand |
A natural number superior or equal to |
A matrix with nb_mut
rows of selected mutation effects in n
columns (phenotypic dimension(s)). Note that if the number of drawn beneficial mutants
is inferior to nb_mut
the matrix is filed with NAs. In this case nb_mut_rand
must be increased.
1 2 3 | generate_selected_mutation(nb_mut = 5, n = 3, lambda = 0.1, maxfitness = 1, pheno_wt = c(-1, 0, 0))
generate_selected_mutation(nb_mut = 5, n = 3, lambda = 0.1, maxfitness = 1, pheno_wt = c(-1, 0, 0),
alpha = 1, Q = 0.5, m = 2, nb_mut_rand = 10^5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.