Running examples in ‘AlphaSimR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: SimParam
> ### Title: Simulation parameters
> ### Aliases: SimParam
> 
> ### ** Examples
> 
> 
> ## ------------------------------------------------
> ## Method `SimParam$new`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> 
> ## ------------------------------------------------
> ## Method `SimParam$setTrackPed`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$setTrackPed(TRUE)
> 
> ## ------------------------------------------------
> ## Method `SimParam$setTrackRec`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$setTrackRec(TRUE)
> 
> ## ------------------------------------------------
> ## Method `SimParam$resetPed`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> 
> #Create population
> pop = newPop(founderPop, simParam=SP)
> pop@id # 1:10
 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"
> 
> #Create another population after reseting pedigree
> SP$resetPed()
> pop2 = newPop(founderPop, simParam=SP)
> pop2@id # 1:10
 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"
> 
> ## ------------------------------------------------
> ## Method `SimParam$restrSegSites`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$restrSegSites(minQtlPerChr=5, minSnpPerChr=5)
> 
> ## ------------------------------------------------
> ## Method `SimParam$setSexes`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$setSexes("yes_sys")
> 
> ## ------------------------------------------------
> ## Method `SimParam$addSnpChip`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addSnpChip(10)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addSnpChipByName`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> SP$addSnpChipByName(c("1_1","1_3"))
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitA`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitA(10)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitAD`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitAD(10, meanDD=0.5)
> 
> ## ------------------------------------------------
> ## Method `SimParam$altAddTraitAD`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$altAddTraitAD(nQtlPerChr=10, mean=0, varA=1, varD=0.05, inbrDepr=0.2)
A new trait called Trait1 was added. 
   varD = 0.01630348 
   inbrDepr = 0.2491569 
   meanDD = 0 
   varDD = 0.09211727 
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitAG`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitAG(10, varGxE=2)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitADG`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitADG(10, meanDD=0.5, varGxE=2)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitAE`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitAE(10, relAA=0.1)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitADE`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitADE(10)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitAEG`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitAEG(10, varGxE=2)
> 
> ## ------------------------------------------------
> ## Method `SimParam$addTraitADEG`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitADEG(10, meanDD=0.5, varGxE=2)
> 
> ## ------------------------------------------------
> ## Method `SimParam$setVarE`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitA(10)
> SP$setVarE(h2=0.5)
> 
> ## ------------------------------------------------
> ## Method `SimParam$setCorE`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> ## Don't show: 
> SP$nThreads = 1L
> ## End(Don't show)
> SP$addTraitA(10, mean=c(0,0), var=c(1,1), corA=diag(2))
> SP$setVarE(varE=c(1,1))
> E = 0.5*diag(2)+0.5 #Positively correlated error
> SP$setCorE(E)
Warning in SP$setCorE(E) :
  This function has been deprecated. Use simParam$setVarE instead.
> 
> ## ------------------------------------------------
> ## Method `SimParam$rescaleTraits`
> ## ------------------------------------------------
> 
> #Create founder haplotypes
> founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)
> 
> #Set simulation parameters
> SP = SimParam$new(founderPop)
> SP$addTraitA(10)
Error: C stack usage  28926184916 is too close to the limit
Execution halted
Error: C stack usage  28926184916 is too close to the limit
Fatal error: error during cleanup