% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/contr.simplex.R
\name{contr.simplex}
\alias{contr.simplex}
\title{Orthonormal Contrast Generator}
\usage{
contr.simplex(n, size = NULL)
}
\arguments{
\item{n}{The number of levels in the catagorical variable. If this is a factor or character vector, `n` will be `length(n)`}

\item{size}{Default `1`. The length of the simplex vector.}
}
\value{
A matrix of Orthonormal contrasts.
}
\description{
Generates orthonormal (orthogonal and normalized) contrasts. Each row is the vertex of an N-dimensional simplex. The only exception are contrasts for the 2-level case, which return 1 and -1.
}
\examples{
contr.simplex(4)
}
