% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod_model.R
\name{as_procmod_data_matrix}
\alias{as_procmod_data_matrix}
\alias{as_procmod_data_matrix.logical}
\alias{as_procmod_data_matrix.dist}
\alias{as_procmod_data_matrix.numeric}
\alias{as_procmod_data_matrix.data.frame}
\title{Converts a R object to a matrix usable in a procrustean model.}
\usage{
as_procmod_data_matrix(x, ...)

\method{as_procmod_data_matrix}{logical}(x, ...)

\method{as_procmod_data_matrix}{dist}(x, ...)

\method{as_procmod_data_matrix}{numeric}(x, ...)

\method{as_procmod_data_matrix}{data.frame}(x, contrasts = NULL, ...)
}
\arguments{
\item{x}{the R object to be converted}

\item{...}{supplementary parametters used by some version of that method.}
}
\value{
a numeric matrix
}
\description{
Converts a R object to a matrix usable in a procrustean model.
}
\examples{
    l <- matrix(sample(c(FALSE,TRUE),
                       size = 12,
                       replace = TRUE),
                nrow = 4)

   as_procmod_data_matrix(l)

    n <- matrix(rnorm(12),
                nrow = 4)

    d <-dist(n)
    as_procmod_data_matrix(d)

    n <- matrix(rnorm(12),
                nrow = 4)

    as_procmod_data_matrix(n)

    d <- as.data.frame(matrix(rnorm(12),
                       nrow = 4))
    d$f <- factor(sample(c("A","B","C"),
                         4,
                         replace=TRUE),
                  levels = c("A","B","C","D"))
    as_procmod_data_matrix(d)

}
\author{
Eric Coissac

Christelle Gonindard-Melodelima
}
