# ---------------------------------------------------------------------------
# Example usage
framed <- model_frame(Species ~ Sepal.Width, iris)
framed$data
framed$terms
# ---------------------------------------------------------------------------
# Missing values never result in dropped rows
iris2 <- iris
iris2$Sepal.Width[1] <- NA
framed2 <- model_frame(Species ~ Sepal.Width, iris2)
head(framed2$data)
nrow(framed2$data) == nrow(iris2)
Run the code above in your browser using DataLab