Provides a version of kinship2::kinship
that returns a sparse matrix even when there is only one family.
A full dense matrix is never stored.
The script assigns two functions to the global enviroment when Rcpp::sourceCpp
'ed. These are
kinship_sparse_R
and kinship_sparse
which is an only R and mainly C++ implementation,
respectilvy.
The function can be sourced by calling
download.file("https://gist.githubusercontent.com/boennecd/b51550a8bec2fde6d48f8f3c2d1f69a1/raw",
cpp_file <- paste0(tempfile(), ".cpp"))