ts_tree | R Documentation |
For more information about optional keyword arguments see tskit documentation: https://tskit.dev/tskit/docs/stable/python-api.html#the-treesequence-class
ts_tree(ts, i, mode = c("index", "position"), ...)
ts |
Tree sequence object of the class |
i |
Position of the tree in the tree sequence. If |
mode |
How should the |
... |
Additional keyword arguments accepted by
|
Python-reticulate-based object of the class tskit.trees.Tree
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 zero-th tree in the tree sequence
tree <- ts_tree(ts, i = 0)
# extract the tree at a position in the tree sequence
tree <- ts_tree(ts, i = 100000, mode = "position")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.