50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

pophelper (version 2.1.0)

popLabels: Internal: Handles pop subset/order

Description

Internal: Takes a cluster matrix along with pop labels and pop order. If pop order is different, cluster matrix is reordered by pops without sorting individuals. Also creates labelpos and markerpos dfs.

Usage

popLabels(df = NULL, poplab = NA, subsetpops = NA, popmean = FALSE,
  labpos = NA, linepos = NA)

Arguments

df

A q-matrix dataframe

poplab

A character vector of population labels

subsetpops

A character or character vector of pop names to subset/reorder

popmean

A logical indicating if q-matrix must be converted from individual to population mean.

labpos

A numeric indicating y-axis position of labels

linepos

A numeric indicating y-axis position of label line

Value

Returns a list with subsetted/reordered q-matrix and a character vector or subsetted/reordered pop label vector. If labpos and linepos is not NA, then they are included in the list.