read_individuals: Read individual-wise data

View source: R/read_individuals.R

read_individualsR Documentation

Read individual-wise data

Description

Wrapper around read_speciome for variables with one value per individual per time point.

Usage

read_individuals(root, variables, ncols = NULL)

Arguments

root

Path to the simulation folder

variables

Vector of names of variable to read

ncols

Vector or list indicating how to split or duplicate each variable when constructing the tibble. See read_speciome.

Details

The function will read "population_sizes.dat" in order to know by how many individuals to duplicate each time point, as the number of individuals may change from one generation to the next.

Value

A tibble containing the simulation data

Note

The function will read "time.dat" as an extra variable, no need to supply it.

See Also

read_speciome

Examples


root <- system.file("extdata", "sim-example", package = "speciomer")
read_individuals(root, "individual_ecotypes")
read_individuals(root, c("individual_traits", "individual_ecotypes"), ncols = c(3, 1))


rscherrer/speciomer documentation built on March 11, 2023, 5:37 p.m.