read_data | R Documentation |
Combine data from one simulation, saved as binary files, into a single tibble.
read_data(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 sim2tbl
.
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").
sim2tbl
root <- system.file("extdata", "sim-example", package = "brachypoder")
read_data(root, "time")
read_data(root, c("time", "popsize"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.