11# Generated by using Rcpp::compileAttributes() -> do not edit by hand
22# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33
4- # ' @name ts_metadata_length
5- # ' @title Get the length of metadata in a tree sequence and its tables
6- # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t} object.
7- # ' @details This function returns the length of metadata stored on the tree
8- # ' sequence and in each table by calling
9- # ' \code{tsk_treeseq_get_metadata_length()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_metadata_length} on tree sequence and
10- NULL
11-
124# ' Report the version of installed kastore C API
135# '
146# ' @details The version is stored in the installed header \code{kastore.h}.
157# ' @return A named vector with three elements \code{major}, \code{minor}, and
16- # ' \code{patch}.
8+ # ' \code{patch}.
179# ' @examples
1810# ' kastore_version()
1911# ' @export
@@ -25,7 +17,7 @@ kastore_version <- function() {
2517# '
2618# ' @details The version is defined in the installed header \code{tskit/core.h}.
2719# ' @return A named vector with three elements \code{major}, \code{minor}, and
28- # ' \code{patch}.
20+ # ' \code{patch}.
2921# ' @examples
3022# ' tskit_version()
3123# ' @export
@@ -38,9 +30,10 @@ tskit_version <- function() {
3830# ' @param file a string specifying the full path of the tree sequence file.
3931# ' @param options integer bitwise options (see details).
4032# ' @details This function calls \code{tsk_treeseq_load()} from the tskit C API.
41- # ' See \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_load}
42- # ' for more details.
43- # ' @return Tree sequence as an external pointer to a \code{tsk_treeseq_t} object.
33+ # ' \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_load}
34+ # ' provides more details.
35+ # ' @return Tree sequence as an external pointer to a \code{tsk_treeseq_t}
36+ # ' object.
4437# ' @examples
4538# ' ts_file <- system.file("examples/test.trees", package = "tskitr")
4639# ' ts <- tskitr::ts_load(ts_file) # slendr also has ts_load()!
@@ -54,12 +47,13 @@ ts_load <- function(file, options = 0L) {
5447
5548# ' Write a tree sequence to file.
5649# '
57- # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t} object.
58- # ' @param file a string specifying the full path of the tree sequence file.
50+ # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t}
51+ # ' object.
52+ # ' @param file a string specifying the full path of the tree sequence file
5953# ' @param options integer bitwise options (see details).
6054# ' @details This function calls \code{tsk_treeseq_dump()} from the tskit C API
61- # ' See \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_dump}
62- # ' for more details.
55+ # ' \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_dump}
56+ # ' provides more details.
6357# ' @return No return value, called for side effects.
6458# ' @examples
6559# ' ts_file <- system.file("examples/test.trees", package = "tskitr")
@@ -73,26 +67,41 @@ ts_dump <- function(ts, file, options = 0L) {
7367}
7468
7569# ' @name ts_summary
76- # ' @title Get the summary of properties and number of records in a tree sequence
77- # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t} object.
78- # ' @details These functions return the summary of properties and number of records
79- # ' in a tree sequence, by calling
80- # ' \code{tsk_treeseq_get_num_provenances()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_provenances},
81- # ' \code{tsk_treeseq_get_num_populations()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_populations},
82- # ' \code{tsk_treeseq_get_num_migrations()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_migrations},
83- # ' \code{tsk_treeseq_get_num_individuals()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_individuals},
84- # ' \code{tsk_treeseq_get_num_samples()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_samples},
85- # ' \code{tsk_treeseq_get_num_nodes()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_nodes},
86- # ' \code{tsk_treeseq_get_num_edges()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_edges},
87- # ' \code{tsk_treeseq_get_num_trees()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_trees},
88- # ' \code{tsk_treeseq_get_num_sites()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_sites},
89- # ' \code{tsk_treeseq_get_num_mutations()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_mutations},
90- # ' \code{tsk_treeseq_get_sequence_length()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_sequence_length},
70+ # ' @title Get the summary of properties and number of records in a tree
71+ # ' sequence
72+ # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t}
73+ # ' object.
74+ # ' @details These functions return the summary of properties and number of
75+ # ' records in a tree sequence, by calling
76+ # ' \code{tsk_treeseq_get_num_provenances()}
77+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_provenances},
78+ # ' \code{tsk_treeseq_get_num_populations()}
79+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_populations},
80+ # ' \code{tsk_treeseq_get_num_migrations()}
81+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_migrations},
82+ # ' \code{tsk_treeseq_get_num_individuals()}
83+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_individuals},
84+ # ' \code{tsk_treeseq_get_num_samples()}
85+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_samples},
86+ # ' \code{tsk_treeseq_get_num_nodes()}
87+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_nodes},
88+ # ' \code{tsk_treeseq_get_num_edges()}
89+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_edges},
90+ # ' \code{tsk_treeseq_get_num_trees()}
91+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_trees},
92+ # ' \code{tsk_treeseq_get_num_sites()}
93+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_sites},
94+ # ' \code{tsk_treeseq_get_num_mutations()}
95+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_num_mutations},
96+ # ' \code{tsk_treeseq_get_sequence_length()}
97+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_sequence_length},
9198# ' and
92- # ' \code{tsk_treeseq_get_time_units()} \url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_time_units}.
99+ # ' \code{tsk_treeseq_get_time_units()}
100+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_time_units}.
93101# ' from the tskit C API. See the linked documentation for more details.
94- # ' @return \code{ts_summary} returns a named list with the number/value for all items,
95- # ' while other functions \code{ts_num_x} etc. return the number/value of each item.
102+ # ' @return \code{ts_summary} returns a named list with the number/value for
103+ # ' all items, while other functions \code{ts_num_x} etc. return the
104+ # ' number/value of each item.
96105# ' @examples
97106# ' ts_file <- system.file("examples/test.trees", package = "tskitr")
98107# ' ts <- tskitr::ts_load(ts_file) # slendr also has ts_load()!
@@ -138,7 +147,8 @@ ts_num_individuals <- function(ts) {
138147 .Call(`_tskitr_ts_num_individuals` , ts )
139148}
140149
141- # ' @describeIn ts_summary Get the number of samples (of nodes) in a tree sequence
150+ # ' @describeIn ts_summary Get the number of samples (of nodes) in a tree
151+ # ' sequence
142152# ' @export
143153ts_num_samples <- function (ts ) {
144154 .Call(`_tskitr_ts_num_samples` , ts )
@@ -186,6 +196,17 @@ ts_time_units <- function(ts) {
186196 .Call(`_tskitr_ts_time_units` , ts )
187197}
188198
199+ # ' @name ts_metadata_length
200+ # ' @title Get the length of metadata in a tree sequence and its tables
201+ # ' @param ts tree sequence as an external pointer to a \code{tsk_treeseq_t}
202+ # ' object.
203+ # ' @details This function returns the length of metadata stored on the tree
204+ # ' sequence and in each table by calling
205+ # ' \code{tsk_treeseq_get_metadata_length()}
206+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_treeseq_get_metadata_length}
207+ # ' on tree sequence and
208+ # ' \code{ts->tables->x->metadata_length} on each table \code{x}, e.g.,
209+ # '\url{https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_population_table_t.metadata_length},
189210# ' from the tskit C API. See the linked documentation for more details.
190211# ' @return A named list with the length of metadata.
191212# ' @examples
0 commit comments