summarize_facets: Summarize possible snpRdata object facet options

View source: R/utility_functions.R

summarize_facetsR Documentation

Summarize possible snpRdata object facet options

Description

List either all of the possible SNP and sample facets (if called with no facets) or all of the categories for each requested facet.

Usage

summarize_facets(x, facets = NULL)

Arguments

x

snpRdata object

facets

character. Categorical metadata variables by which to break up analysis. See Facets_in_snpR for more details. If NULL, the possible SNP and sample facets will be listed. If facets are instead provided, the categories for each facet will instead be listed.

Details

If called with sample facets, returns a table of counts of each category otherwise returns a vector of categories.

Value

A named list containing either the possible SNP and sample facets or the categories for all of the requested facets.

Author(s)

William Hemstrom

Examples

# list available facets
summarize_facets(stickSNPs)

# return details for a few facets
summarize_facets(stickSNPs, c("pop", "chr.pop", "fam.pop"))

hemstrow/snpR documentation built on March 20, 2024, 7:03 a.m.