Learn R Programming

slendr (version 1.0.0)

ts_samples: Extract names and times of individuals of interest in the current tree sequence (either all sampled individuals or those that the user simplified to)

Description

Extract names and times of individuals of interest in the current tree sequence (either all sampled individuals or those that the user simplified to)

Usage

ts_samples(ts)

Value

Table of individuals scheduled for sampling across space and time

Arguments

ts

Tree sequence object of the class slendr_ts

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
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 table of individuals scheduled for simulation and sampling
ts_samples(ts)

Run the code above in your browser using DataLab