RcppTskit - 'R' Access to the 'tskit C' API
'Tskit' enables efficient storage, manipulation, and
analysis of ancestral recombination graphs (ARGs) using
succinct tree sequence encoding. The tree sequence encoding of
an ARG is described in Wong et al. (2024)
<doi:10.1093/genetics/iyae100>, while 'tskit' project is
described in Jeffrey et al. (2026)
<doi:10.48550/arXiv.2602.09649>. See also <https://tskit.dev>
for project news, documentation, and tutorials. 'Tskit'
provides 'Python', 'C', and 'Rust' application programming
interfaces (APIs). The 'Python' API can be called from 'R' via
the 'reticulate' package to load and analyse tree sequences as
described at <https://tskit.dev/tutorials/tskitr.html>.
'RcppTskit' provides 'R' access to the 'tskit C' API for cases
where the 'reticulate' option is not optimal; for example,
high-performance or low-level work with tree sequences.
Currently, 'RcppTskit' provides a limited set of functions
because the 'Python' API and 'reticulate' already cover most
needs. The provided 'RcppTskit R' API mirrors the 'tskit
Python' API, while the 'RcppTskit C++' API mirrors the 'tskit
C' API. Users should explore the 'RcppTskit' help pages of 'R'
functions, while developers should explore the
'RcppTskit:::rtsk_*' low-level 'R' and 'C++'' functions.