This routine is the inverse of the bdsmatrix.ibd function found in the kinship library.
listbdsmatrix(x, id = TRUE, diag = FALSE)
a data frame with variables row
, col
, and
value
.
a bdsmatrix
object
if true, the dimnames of the object are used as the row and column identifiers in the output, if false integer row and column numbers are used
include the diagonal elements in the output
Terry Therneau
The non-zero elements of the matrix are listed out as row-col-value triplets, one per line, in a data frame. Since the matrix is known to be symmetric, only elements with row >= col are listed. When familial correlation data is represented in a bdsmatrix, e.g. kinship or identity-by-descent information, the diagonal is a known value and can be omitted from the listing. Genetic software often produces matrices in the list form; this routine is the inverse of the bdsmatrix.ibd routine, found in the kinship library, which converts list form to bdsmatrix form.
bdsmatrix