Skip to contents

This function reorders the q matrices in a gt_admix object based on the grouping variable. This is useful before plotting when the samples from each group are not adjacent to each other in the q matrix.

Usage

gt_admix_reorder_q(x, group = NULL)

Arguments

x

a gt_admix object, possibly with a grouping variable

group

a character vector with the grouping variable (if there is no grouping variable info in x)

Value

a gt_admix object with the q matrices reordered