permute | R Documentation |
Rearranges a data matrix according to a permutation order.
permute(object, order, ...)
## S4 method for signature 'data.frame,PermutationOrder'
permute(object, order)
## S4 method for signature 'matrix,PermutationOrder'
permute(object, order)
object |
A |
order |
A |
... |
Currently not used. |
A permuted matrix
or a permuted data.frame
(the same as object
).
N. Frerebeau
Other seriation methods:
as_seriation()
,
assess()
,
order()
,
refine()
,
seriate_average()
,
seriate_rank()
## Replicates Desachy 2004 results
data("compiegne", package = "folio")
## Get seriation order for columns on EPPM using the reciprocal averaging method
## Expected column order: N, A, C, K, P, L, B, E, I, M, D, G, O, J, F, H
(indices <- seriate_rank(compiegne, EPPM = TRUE, margin = 2))
## Get permutation order
order_rows(indices)
order_columns(indices)
## Permute columns
(new <- permute(compiegne, indices))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.