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"))
ts <- ts_read(slendr_ts, model)
ts
# simplify tree sequence to sampled individuals
ts_simplified <- ts_simplify(ts)
# simplify to a subset of sampled individuals
ts_small <- ts_simplify(ts, simplify_to = c("CH_1", "NEA_1", "NEA_2", "AFR_1",
"AFR_2", "EUR_1", "EUR_2"))
ts_small
Run the code above in your browser using DataLab