Learn R Programming

slendr (version 1.0.0)

read_model: Read a previously serialized model configuration

Description

Reads all configuration tables and other model data from a location where it was previously compiled to by the compile function.

Usage

read_model(path)

Value

Compiled slendr_model model object which encapsulates all information about the specified model (which populations are involved, when and how much gene flow should occur, what is the spatial resolution of a map, and what spatial dispersal and mating parameters should be used in a SLiM simulation, if applicable)

Arguments

path

Directory with all required configuration files

Examples

Run this code
check_dependencies(python = TRUE, quit = TRUE) # dependencies must be present

init_env()

# load an example model with an already simulated tree sequence
path <- system.file("extdata/models/introgression", package = "slendr")
model <- read_model(path)

plot_model(model, sizes = FALSE, log = TRUE)

Run the code above in your browser using DataLab