extract_parameters: Extract information from a compiled model or a simulated tree...

View source: R/extract_parameters.R

extract_parametersR Documentation

Extract information from a compiled model or a simulated tree sequence

Description

This function extract a slendr model parameters used to compile a given model object or simulate a tree sequence

Usage

extract_parameters(data)

Arguments

data

Either an object of the class slendr_ts or slendr_model

Value

A list of data frames containing parameters of the model used when compiling a model object

Examples


init_env()

# load an example model and simulate a tree sequence from it
model <- read_model(path = system.file("extdata/models/introgression", package = "slendr"))
ts <- msprime(model, sequence_length = 1e5, recombination_rate = 0)

# extract model parameters from a compiled model object as a list of data frames
extract_parameters(model)

# the function can also extract parameters of a model which simulated a
# tree sequence
extract_parameters(ts)


bodkan/slendr documentation built on Dec. 19, 2024, 11:41 p.m.