count_loci: Count the number of loci in a 'gen_tibble'

View source: R/count_loci.R

count_lociR Documentation

Count the number of loci in a gen_tibble

Description

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 class vctrs_bigSNP (usually the genotype column of a gen_tibble object).

...

currently unused.

Value

the number of loci

Examples

example_gt <- load_example_gt("gen_tbl")

example_gt %>% count_loci()

tidypopgen documentation built on Aug. 28, 2025, 1:08 a.m.