R/seriate.matrix.R

Defines functions seriate.matrix

Documented in seriate.matrix

#######################################################################
# seriation - Infrastructure for seriation
# Copyright (C) 2011 Michael Hahsler, Christian Buchta and Kurt Hornik
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#' @rdname seriate
#' @include seriate.dist.R
#' @export
seriate.matrix <- function(x,
  method = "PCA",
  control = NULL,
  margin = c(1L, 2L),
  rep = 1L,
  ...) {
  if (rep > 1L)
    return(seriate_rep(x, method, control, rep = rep, margin = margin, ...))

  .seriate_array_helper(x,
    method,
    control,
    margin,
    datatype = "matrix",
    ...)
  }
mhahsler/seriation documentation built on April 24, 2024, 10:08 p.m.