permute | R Documentation |
permute()
rearranges a data matrix according to a permutation order.
get_order()
returns the seriation order for rows and/or columns.
permute(object, order, ...)
get_order(x, ...)
## S4 method for signature 'data.frame,PermutationOrder'
permute(object, order)
## S4 method for signature 'matrix,PermutationOrder'
permute(object, order)
## S4 method for signature 'PermutationOrder'
get_order(x, margin = c(1, 2))
object |
A |
... |
Currently not used. |
x , order |
A |
margin |
A |
permute()
returns a permuted matrix
or a permuted data.frame
(the same as object
).
N. Frerebeau
dimensio::ca()
Other seriation methods:
seriate_average()
,
seriate_rank()
,
seriate_refine()
## 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
get_order(indices, 1) # rows
get_order(indices, 2) # columns
## Permute columns
(new <- permute(compiegne, indices))
## See the vignette
## Not run:
utils::vignette("seriation")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.