condition ? yes else no
).R/slimr_scripting.R
grapes-else-grapes.Rd
This is used in conjunction with which will make the code valid in R. Note that the R function is a stub, it does not do anything in R (except bring up this documentation). It will only do anything useful when used inside a \code\linkslim_block function further nested in a \code\linkslim_script function call, where it will be translated into valid SLiM code as part of a full SLiM script.
lhs %else% rhs
A SLiM expression to be executed if the condition (before the companion
is TRUE
A SLiM expression to be executed if the condition (before the companion
is FALSE
This is documentation for a function in the SLiM software, and has been reproduced from the official manual, which can be found here: \urlhttp://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016–2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: \urlhttps://messerlab.org/slim/
slim_script(slim_block_init_minimal(),
slim_block(cat(fixed %?% "FIXED\\n" %else% "LOST\\n"))) |>
as_slim_text() |>
cat()
#> initialize() {
#> initializeMutationRate(1e-07);
#> initializeMutationType("m1", 0.5, "f", 0);
#> initializeGenomicElementType("g1", m1, 1);
#> initializeGenomicElement(g1, 0, 1e+05 - 1);
#> initializeRecombinationRate(1e-08);
#> }
#>
#> 1:1 early() {
#> cat(fixed ? "FIXED\\n" else "LOST\\n");
#> }