Description Usage Arguments Value Author(s) Examples
Creates a valid parameter file
1 2 3 | save_parameters_to_file(rng_seed, sirg, siri, scr, erg, eri, age, mutation_rate,
n_alignments, sequence_length, nspp, n_beast_runs, filename,
fixed_crown_age = FALSE)
|
rng_seed |
the random number generator seed |
sirg |
the species initiation rate of the good species |
siri |
the speciation-initiation rate of the incipient species |
scr |
the rate at which incipient species become good |
erg |
the rate at which good species get extinct |
eri |
the rate at which incipient species get extinct |
age |
crown age of the phylogeny |
mutation_rate |
the probability per nucleotide to mutate at a DNA replication |
n_alignments |
the number of alignments simulated per species tree |
sequence_length |
the simulated DNA sequence length in nucleotides |
nspp |
the number of states in the MCMC chain that BEAST2 will run |
n_beast_runs |
the number of BEAST2 runs per DNA alignments |
filename |
the name of the parameter file that will be created by this function |
fixed_crown_age |
the crown age is fixed (for TRUE) or estimated with lambda and mu (for FALSE) |
Nothing, it will create a file with filename 'filename'
Richel Bilderbeek
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | filename <- "save_parameters_to_file_example.RDa"
save_parameters_to_file(
rng_seed = 42,
sirg = 0.5,
siri = 0.5,
scr = 0.5,
erg = 0.5,
eri = 0.5,
age = 5,
mutation_rate = 0.1,
n_alignments = 1,
sequence_length = 10,
nspp = 10,
n_beast_runs = 1,
filename = filename
)
testit::assert(is_valid_file(filename) == TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.