Learn R Programming

tidypopgen (version 0.4.3)

loci_chromosomes: Get the chromosomes of loci in a gen_tibble

Description

Extract the loci chromosomes from a gen_tibble (or directly from its genotype column).

Usage

loci_chromosomes(.x, .col = "genotypes", ...)

# S3 method for tbl_df loci_chromosomes(.x, .col = "genotypes", ...)

# S3 method for vctrs_bigSNP loci_chromosomes(.x, .col = "genotypes", ...)

Value

a character vector of chromosomes

Arguments

.x

a gen_tibble, or a vector of class vctrs_bigSNP (usually the genotype column of a gen_tibble object).

.col

the column to be used when a tibble (or grouped tibble is passed directly to the function). This defaults to "genotypes" and can only take that value. There is no need for the user to set it, but it is included to resolve certain tidyselect operations.

...

currently unused.

Examples

Run this code
example_gt <- load_example_gt("gen_tbl")
example_gt %>% loci_chromosomes()

Run the code above in your browser using DataLab