Skip to contents

The gets functions use the output of holo_simu() to extract the information of interest from a given generation. get_selected_indextract selectd individuals IDs from a generation object.

Usage

get_selected_ind(data)

Arguments

data

List corresponding to one generation, as returned by holo_simu(). Containing simulation output.

Value

Alist of the selected individuals of a given generation.

Examples

if (FALSE) { # \dontrun{
library(magrittr)
library(purrr)
data("Deru")
ToyData <- Deru
taxa_assign_g <- assign_taxa(founder_object = ToyData)
generations_simu <- holo_simu(h2 = 0.25, b2 = 0.25, founder_object = ToyData,
                              n_clust = taxa_assign_g, n_ind = 500,
                              verbose = FALSE, seed = 1234)
                              
#Extract selected individuals IDs for the G1 generation
G1_selected_ind <- get_selected_ind(generations_simu$G1)
 
#Extract selected individuals IDs for all generations
## Don't forget to substract the metadata
selected_ind <- generations_simu[-1] %>% map(get_selected_ind)
} # }