View source: R/read_speciome.R
read_speciome | R Documentation |
Combine data from one simulation, saved as binary files, into a single tibble.
read_speciome(root, variables, ncols = rep(1, length(variables)))
root |
Path to the simulation folder |
variables |
Vector of names of variable to read (e.g. |
ncols |
Vector or list indicating how to split or duplicate each variable
when constructing the tibble. There must be one element per variable.
See |
Each variable is read as a vector and reshaped into a tibble by being
passed, with its corresponding ncols
, to as_tibble_speciome
.
The resulting tibbles for all variables are then bound together by column.
A tibble containing the simulation data
Do not provide the extension of the data files in variables
(".dat").
as_tibble_speciome
root <- system.file("extdata", "sim-example", package = "speciomer") read_speciome(root, "time") read_speciome(root, c("time", "EI")) read_speciome(root, c("time", "trait_Fst"), ncol = c(1, 3)) read_speciome(root, c("time", "trait_Fst"), ncol = c(-3, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.