ser_permutation
or ser_permutation_vector
.
Order information can be extracted as an integer permutation vector,
a vector containing the object ranks or a permutation matrix.get_order(x, ...)
## S3 method for class 'ser_permutation_vector':
get_order(x, \ldots)
## S3 method for class 'ser_permutation':
get_order(x, dim = 1, \ldots)
get_permutation_matrix(x, ...)
ser_permutation
or
ser_permutation_vector
.get_order
. For
get_permutation_matrix
the additional arguments are passed on to
get_order
(e.g., as dim
).get_order
returns the seriation as an integer vector containing
the rank/position of each object of the $n$ objects in the permuted order
(i.e., position of 1st object, 2nd object, ... $n$th object).
get_permutation_matrix
returns a $n \times n$ permutation matrix.ser_permutation_vector
,
ser_permutation
## permutation_vector
o <- ser_permutation_vector(sample(10))
o
get_order(o)
get_permutation_matrix(o)
## permutation
o2 <- ser_permutation(o, sample(5))
o2
get_order(o2, dim = 2)
get_permutation_matrix(o2, dim = 2)
Run the code above in your browser using DataLab