Description Usage Arguments Value Author(s) Examples
Adds a pbd_sim result to a file
1 | add_pbd_output(filename)
|
filename |
Parameter filename |
Nothing, modifies the parameter file
Richel Bilderbeek
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # Create a parameter file
filename <- "add_pbd_output_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
)
# File does not have an incipient species tree yet
testit::assert(
!ribir::is_pbd_sim_output(
wiritttes::get_pbd_output(
wiritttes::read_file(filename)
)
)
)
# Add an incipient species tree
add_pbd_output(filename)
# File does have an incipient species tree now
testit::assert(
ribir::is_pbd_sim_output(
wiritttes::get_pbd_output(
wiritttes::read_file(filename)
)
)
)
# Cleanup
file.remove(filename)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.