View source: R/tree-sequences.R
ts_write | R Documentation |
Save a tree sequence to a file
ts_write(ts, file)
ts |
Tree sequence object loaded by |
file |
File to which the tree sequence should be saved |
No return value, called for side effects
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
ts <- ts_read(slendr_ts, model)
# save the tree-sequence object to a different location
another_file <- paste(tempfile(), ".trees")
ts_write(ts, another_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.