Add a per-sample xpos column for sample data based on grouping

add_sample_xpos(data, group_cols, group_order = NULL)

Arguments

data

a data.frame with both annotations and gene expression vales

group_cols

a group_cols list generated by group_columns()

group_order

an optional vector of group ids for ordering (default is NULL).

Value

a data.frame of data with a column xpos appended.