View source: R/craft-align-order.R
align_order | R Documentation |
Ordering observations based on summary weights or a specified ordering character or integer index.
align_order(
weights = rowMeans,
...,
reverse = FALSE,
strict = TRUE,
data = NULL,
active = NULL
)
weights |
A summary function which accepts a data and returns the
weights for each observations. Alternatively, you can provide an ordering
index as either an integer or a character. Since characters have been
designated as character indices, if you wish to specify a function name as a
string, you must enclose it with |
... |
<dyn-dots> Additional arguments passed to
function provided in |
reverse |
A boolean value. Should the sort order be in reverse? |
strict |
A boolean value indicates whether the order should be strict.
If previous groups has been established, and strict is |
data |
A |
active |
A |
It is important to note that we consider rows as observations, meaning
vec_size(data)
/NROW(data)
must match the number of observations along the
axis used for alignment (x-axis for a vertical stack layout, y-axis for a
horizontal stack layout).
ggheatmap(matrix(rnorm(81), nrow = 9)) +
anno_left() +
align_order(I("rowMeans"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.