% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iron.R
\name{waffle_iron}
\alias{waffle_iron}
\title{Waffle Iron}
\usage{
waffle_iron(data, mapping, rows = 8, sample_size = 1, na.rm = T)
}
\arguments{
\item{data}{A dataframe to feed into the waffle iron}

\item{mapping}{A mapping as produce by \code{\link{aes_d}}, \code{\link{aes_d_}} or a character vector of a column present in the dataset}

\item{rows}{The number of rows in the waffle}

\item{sample_size}{The proportion of rows to sample the dataset (between 0 and 1). Useful when the dataset is too large to plot correctly.}

\item{na.rm}{A boolean flag to automatically remove NAs. Removing NAs will sometimes cause a missing notch in your waffle.}
}
\description{
Pour your data into a waffle iron to get ready to cook a waffle chart.
}
\details{
Prepare raw data so it is fit to create a waffle visualisation. The type of data transformation that is required does not gel
well with ggplot2 underlying mechanism. The way around this is to provide a function that does the preperation outside of ggplot.
}
\examples{
waffle_iron(mpg, aes_d(group = class))

waffle_iron(mpg, aes_d(group = class), sample_size = 0.75)
}
