Count the number of loci in gen_tibble
(or directly from its genotype
column).
Usage
count_loci(.x, ...)
# S3 method for class 'tbl_df'
count_loci(.x, ...)
# S3 method for class 'vctrs_bigSNP'
count_loci(.x, ...)
Arguments
- .x
a
gen_tibble
, or a vector of classvctrs_bigSNP
(usually thegenotype
column of agen_tibble
object).- ...
currently unused.
Examples
example_gt <- example_gt("gen_tbl")
example_gt %>% count_loci()
#> [1] 6