sort_counts | R Documentation |
DESeqDataSetFromMatrix
requires count columns sorted by the rows in sample data and only checks
if sample row names match count column names (and tibbles do not have row names). This matches column
names in a count table to the first column in sample data and reorders columns to match.
sort_counts(count_tbl, sample_tbl, id = 1)
count_tbl |
count matrix, data.frame or tibble |
sample_tbl |
sample tabl with a column containing the columns names in count matrix |
id |
position of column in sample data that matches column names in the count table, default is the first column |
A count matrix with columns re-ordered to match the sample table
Chris Stubben
## Not run:
count_tbl <- sort_counts(counts, samples)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.