Created
July 21, 2019 03:51
-
-
Save seasmith/8464ffddb354a2c9cc3f244b2e01f210 to your computer and use it in GitHub Desktop.
Modeling with the iris data set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(broom) # alt to par(mfrow(2,2)); plot(mod) | |
library(rsample) | |
library(dplyr) | |
library(ggplot2) # alt to par(mfrow(2,2)); plot(mod) | |
set.seed(1492) | |
ifrac <- initial_split(iris) | |
iris_test <- testing(ifrac) | |
iris_trian <- training(ifrac) | |
f1 <- Petal.Length ~ Sepal.Length | |
iris_lm_1a <- lm(f1, data = iris) | |
iris_tidy_1a <- glance(iris_lm_1a) | |
iris_glance_1a <- tidy(iris_lm_1a) | |
iris_augment_1a <- augment(iris_lm_1a) | |
glimpse(iris_tidy_1a) | |
glimpse(iris_glance_1a) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment