View source: R/human_functions.R
reorder_factor | R Documentation |
This function takes two identical annotations (e.g, two cluster calls for the same cells) and updates the levels of the match cluster to correspond to the levels of the reference cluster. This is useful to run prior to 'compare_plot' if clusters are not already ordered.
'clRef' and 'clMatch' should be factors, but can be coerced from characters if needed.
reorder_factor(clMatch, clRef)
clMatch |
A cluster factor object to compare to a reference |
clRef |
A cluster factor object for the reference clusters |
The 'clMatch' vector with levels rearranged to match 'clRef' in a reasonable way.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.