Description Usage Arguments Value Examples
Write a slimr_script object to a text file, which can be run in SLiM as a SLiM script
1 | slimr_write(x, file, ...)
|
x |
|
file |
File path to write to |
... |
Further arguments to be passed to or from other objects |
Returns x
, invisibly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | slim_script(
slim_block(initialize(),
{
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 99999);
initializeRecombinationRate(1e-8);
}),
slim_block(1,
{
sim.addSubpop("p1", 500);
}),
slim_block(10000,
{
sim.simulationFinished();
})
) -> script
temp_file <- tempfile(fileext = ".txt")
slimr_write(script, temp_file)
readLines(temp_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.