# NOT RUN {
# Registry
registry_seriate
# List all seriation methods by type
list_seriation_methods()
# List methods for matrix seriation
list_seriation_methods("matrix")
get_seriation_method(name = "BEA")
# Example for defining a new seriation method (reverse identity function for matrix)
# 1. Create the seriation method
seriation_method_reverse <- function(x, control) {
# return a list of order vectors, one for each dimension
list(seq(nrow(x), 1), seq(ncol(x), 1))
}
# 2. Register new method
set_seriation_method("matrix", "Reverse", seriation_method_reverse,
description = "Reverse identity order", control = list())
list_seriation_methods("matrix")
get_seriation_method("matrix", "reverse")
# 3. Use the new seriation methods
seriate(matrix(1:12, ncol=3), "reverse")
# }
Run the code above in your browser using DataLab