% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/recipe_sim_datagen.R
\name{gen_covariates}
\alias{gen_covariates}
\title{Generate covariate matrix/data frame from a recipe}
\usage{
gen_covariates(n, covariates)
}
\arguments{
\item{n}{sample size}

\item{covariates}{list(defs = list(...))}
}
\value{
data.frame of covariates
}
\description{
Generate covariate matrix/data frame from a recipe
}
\examples{
defs <- list(
  list(name="x", type="continuous", dist="normal", params=list(mean=0, sd=1)),
  list(name="z", type="categorical", dist="categorical",
       params=list(prob=c(0.3,0.7), labels=c("A","B")))
)
X <- gen_covariates(10, list(defs = defs))
}
