magnusdv / ribd

Computation of pedigree-based relatedness coefficients. Part of the ped suite packages for pedigree analysis in R
https://magnusdv.github.io/pedsuite/
6 stars 1 forks source link

`showInTriangle` #15

Open thoree opened 2 years ago

thoree commented 2 years ago

When I run the below commands from Lecture4, Norbis 2022, I get two extra points, one for the mean, and one for the standard deviation. I understand why when I read the documentation of showInTriangle ("an attempt is made to bind the elements row-wise"), but perhaps it should be easier to avoid this error?! With the current code, the last line below should be showInTriangle(k$perSimulation)

library(ibdsim2, quietly = T)
x = nuclearPed(2)
s = ibdsim(x, N = 2, seed = 1729, verbose = F)
k = realisedKappa(s, ids = c(3, 4))
ribd::showInTriangle(k)

Created on 2022-07-07 by the reprex package (v2.0.1)