sort_results: Sort entries in results data frames

View source: R/analyze_dataset.R

sort_resultsR Documentation

Sort entries in results data frames

Description

Rearrange rows in the summary data frame and corresponding entries in the per-sample data frames list, matching locus order given in locus attributes. The Locus column of the summary data frame will be set to a factor to preserve the defined order. Only levels remaining in that set are kept.

Usage

sort_results(results, locus_attrs)

Arguments

results

results list as produced by tidy_analyzed_dataset.

locus_attrs

data frame of locus attributes as produced by load_locus_attrs.

Value

list of results, with summary set to the single summary data frame and data the per-sample data frames. summary$Locus is coerced to a factor with levels ordered according to their appearance in locus_attrs$Locus. Order of rows in summary and entries in data are updated accordingly.


ShawHahnLab/chiimp documentation built on Aug. 20, 2023, 1:41 a.m.