ts_metadata: Extract list with tree sequence metadata saved by SLiM

View source: R/tree-sequences.R

ts_metadataR Documentation

Extract list with tree sequence metadata saved by SLiM

Description

Extract list with tree sequence metadata saved by SLiM

Usage

ts_metadata(ts)

Arguments

ts

Tree sequence object of the class slendr_ts

Value

List of metadata fields extracted from the tree-sequence object

Examples


init_env()

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

# load the tree-sequence object from disk
ts <- ts_read(slendr_ts, model)

# extract the list of metadata information from the tree sequence
ts_metadata(ts)

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