% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_matrix.R
\name{model_matrix}
\alias{model_matrix}
\title{Construct a design matrix}
\usage{
model_matrix(data, formula, ...)
}
\arguments{
\item{data}{A data frame}

\item{formula}{A modelling formula}

\item{...}{Other arguments passed onto \code{\link[stats:model.matrix]{stats::model.matrix()}}}
}
\value{
A tibble.
}
\description{
This is a thin wrapper around \code{\link[stats:model.matrix]{stats::model.matrix()}} which
returns a tibble. Use it to determine how your modelling formula is
translated into a matrix, an thence into an equation.
}
\examples{
model_matrix(mtcars, mpg ~ cyl)
model_matrix(iris, Sepal.Length ~ Species)
model_matrix(iris, Sepal.Length ~ Species - 1)
}
