% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcov.R, R/permute.R
\name{.Trace}
\alias{.Trace}
\alias{.getPermuteMatrix}
\title{Compute the trace of a square matrix.}
\usage{
.Trace(X)

.getPermuteMatrix(perm, N)
}
\arguments{
\item{X}{a square matrix}

\item{perm}{a list of control values for the permutations
as returned by the function how, or the number
of permutations required, or a permutation
matrix where each row gives the permuted indices.}

\item{N}{number of elements to permute.}
}
\value{
the trace of X

a matrix of integer of size nperm x n. Each line corresponds to a
        permutation of n element
}
\description{
The code is copied from the \code{\link[vegan]{getPermuteMatrix}} internal function
of the \code{vegan} pakage. This is mainly a wrappoer around the functions of
the \code{permute} package.
}
\details{
The permutation design is controled through the \code{\link[permute]{how}} function
of the \code{permute} package.
}
\note{
Internal function do not use.

Internal function do not use.
}
\examples{
    m = matrix(1:16,nrow=4)
    ProcMod:::.Trace(m)

    ProcMod:::.getPermuteMatrix(perm=how(nperm=5),N=10)

}
\author{
Eric Coissac

Christelle Gonindard-Melodelima

Christelle Gonindard-Melodelima

Eric Coissac
}
