combine_pop: Combine a list of populations

View source: R/pop_functions.R

combine_popR Documentation

Combine a list of populations

Description

Combine a list of populations

Usage

combine_pop(pop_list)

Arguments

pop_list

A list of objects of class pop.

Details

If pheno_val is present in the pop, the variance components are dropped.

Examples


# Simulate a genome
n.mar  <- c(505, 505, 505)
len <- c(120, 130, 140)

genome <- sim_genome(len, n.mar)

# Simulate a quantitative trait influenced by 50 QTL
qtl.model <- matrix(NA, 50, 4)
genome <- sim_gen_model(genome = genome, qtl.model = qtl.model, 
                        add.dist = "geometric", max.qtl = 50)
                        
# Simulate two populations
pop1 <- sim_pop(genome = genome, n.ind = 100)
pop2 <- sim_pop(genome = genome, n.ind = 100)

# Subset the populations
pop1 <- subset_pop(pop1, indnames(pop1)[1:5])
pop2 <- subset_pop(pop2, indnames(pop2)[20:25])

# Combine
combine_pop(list(pop1, pop2))



neyhartj/qgsim documentation built on Nov. 11, 2023, 4:08 p.m.