Skip to contents

A wrapper for accessing the ebv slot

Usage

ebv(pop)

Arguments

pop

a Pop-class or similar object

Examples

#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$nThreads = 1L
SP$addTraitAD(10, meanDD=0.5)
SP$setVarE(h2=0.5)

#Create population
pop = newPop(founderPop, simParam=SP)
pop@ebv = matrix(rnorm(pop@nInd), nrow=pop@nInd, ncol=1)
ebv(pop)
#>              [,1]
#>  [1,]  0.62102844
#>  [2,]  1.24547543
#>  [3,] -0.09541377
#>  [4,]  1.64671553
#>  [5,]  0.06135819
#>  [6,] -1.02417762
#>  [7,] -0.27775062
#>  [8,] -0.63702615
#>  [9,] -0.58775293
#> [10,]  0.93452665