# NOT RUN {
# Create population
pop <- Population(
popSize = 200, map = map100snp, QTL = 20,
alleleFrequencies = runif(100),
broadH2 = 0.9, narrowh2 = 0.6, traitVar = 40
)
# Attach additive effects using a normal distribution
pop <- addEffects(pop)
# Attach additive effects using a uniform distribution
pop2 <- addEffects(pop, distrib = runif)
# Attach additive effects using a vector of coefficients
effects <- c(
1.2, 1.5, -0.3, -1.4, 0.8,
2.4, 0.2, -0.8, -0.4, 0.8,
-0.2, -1.4, 1.4, 0.2, -0.9,
0.4, -0.8, 0.0, -1.1, -1.3
)
pop3 <- addEffects(pop, effects = effects)
# Print first population
pop
# Print second population
pop2
# Print third population
pop3
# }
Run the code above in your browser using DataLab