View source: R/pop_tajimas_d.R
pop_tajimas_d | R Documentation |
Note that Tajima's D estimates from data that have been filtered or ascertained can be difficult to interpret. This function should ideally be used on sequence data prior to filtering.
pop_tajimas_d(.x, n_cores, block_size, ...)
## S3 method for class 'tbl_df'
pop_tajimas_d(
.x,
n_cores = bigstatsr::nb_cores(),
block_size = bigstatsr::block_size(nrow(.x), 1),
...
)
## S3 method for class 'vctrs_bigSNP'
pop_tajimas_d(
.x,
n_cores = bigstatsr::nb_cores(),
block_size = bigstatsr::block_size(length(.x), 1),
...
)
## S3 method for class 'grouped_df'
pop_tajimas_d(
.x,
n_cores = bigstatsr::nb_cores(),
block_size = bigstatsr::block_size(nrow(.x), 1),
...
)
.x |
a vector of class |
n_cores |
number of cores to be used, it defaults to
|
block_size |
maximum number of loci read at once. |
... |
other arguments passed to specific methods, currently unused. |
A single numeric value (Tajima's D D) for the whole data set, NA
when the statistic is not defined. For grouped data a list of Tajima's D D
values (one per group) is returned.
example_gt <- load_example_gt("grouped_gen_tbl")
# Compute Tajima's D
example_gt %>% pop_tajimas_d()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.