Use this in place of '.' from SLiM to specify a method or a property coming from a particular SLiM class. 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 %.% rhs

Arguments

lhs

Object of class rhs, to extract methods or properties from

rhs

SLiM class R object (such as Subpopulation, .M, etc.). Type slim_classes for a table of possible values.

Author

Benjamin C Haller (\emailbhaller@benhaller.com) and Philipp W Messer (\emailmesser@cornell.edu)

Examples

slim_script(
  slim_block_init_minimal(mutation_rate = 1e-6),
  slim_block(1, early(), {
    sim%.%Sp$addSubpop("p1", 100);
  })
)
#> <slimr_script[2]>
#> block_init:initialize() {
#>     initializeMutationRate(1e-06);
#>     initializeMutationType("m1", 0.5, "f", 0);
#>     initializeGenomicElementType("g1", m1, 1);
#>     initializeGenomicElement(g1, 0, 1e+05 - 1);
#>     initializeRecombinationRate(1e-08);
#> }
#> 
#> block_2:1 early() {
#>     sim.addSubpop("p1", 100);
#> }