sortInd: Internal: Handles individual sorting

Description Usage Arguments Details Value

View source: R/pophelper.R

Description

Internal: Handles individual sorting

Usage

1
2
sortInd(dframe = NULL, grplab = NA, selgrp = NA, ordergrp = FALSE,
  sortind = NA, grplabpos = NA, linepos = NA)

Arguments

dframe

A q-matrix dataframe

grplab

A dataframe with group labels

selgrp

A single character denoting selected group label set. See details.

ordergrp

A logical indicating if individuals must be ordered by all group labels

sortind

A character indicating how individuals are sorted. Default is NA (Same order of individuals as in input file). Other options are 'all' (sorting by values of all clusters), by any one cluster (eg. 'Cluster1') or 'labels' (sorting by individual labels).

grplabpos

A numeric indicating y-axis position of labels

linepos

A numeric indicating y-axis position of label line

Details

When multiple group label sets are in use, selgrp defines which group label set is used for group ordering (ordergrp), subsetting (subsetgrp) and group mean (grpmean). selgrp is also used for plotting divider lines and and sorting (sortind). If selgrp is not specified, the first group label set is used by default.

Value

Returns a list with ordered q-matrix dataframe and ordered grplab.


royfrancis/pophelper documentation built on Aug. 21, 2018, 4:48 a.m.