-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
359fea5
commit 05bf1f8
Showing
95 changed files
with
254 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Put custom tests in this file. | ||
|
||
# Uncommenting the following line of code will disable | ||
# auto-detection of new variables and thus prevent swirl from | ||
# executing every command twice, which can slow things down. | ||
|
||
# AUTO_DETECT_NEWVAR <- FALSE | ||
|
||
# However, this means that you should detect user-created | ||
# variables when appropriate. The answer test, creates_new_var() | ||
# can be used for for the purpose, but it also re-evaluates the | ||
# expression which the user entered, so care must be taken. |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Code placed in this file fill be executed every time the | ||
# lesson is started. Any variables created here will show up in | ||
# the user's working directory and thus be accessible to them | ||
# throughout the lesson. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
- Class: meta | ||
Course: swirl | ||
Lesson: Epilogue | ||
Author: Seo-young Silvia Kim | ||
Type: Standard | ||
Organization: American University | ||
Version: 0.1.0 | ||
|
||
# INTRO ======================================================================== | ||
- Class: text | ||
Output: > | ||
This is a wrap-up to the swirl-tidy lesson. | ||
We covered a lot of ground in this series of twenty-something swirl lessons. | ||
# PREAMBLE ===================================================================== | ||
## demo_lesson(4) | ||
- Class: text | ||
Output: > | ||
We covered, using tidyverse packages, | ||
(1) how to import data | ||
(2) how to tidy the data | ||
(3) how to transform the data | ||
(4) how to visualize the data | ||
(5) how to better program | ||
(6) how to create statistical models | ||
## demo_lesson(5) | ||
- Class: text | ||
Output: > | ||
Some packages that are part of the tidyverse that are not covered here | ||
include {DBI}, {httr}, {jsonlite}, {xml2} (although this is loaded when | ||
we worked with {rvest}), {hms}, {blob}, and {glue}. | ||
## demo_lesson(6) | ||
- Class: text | ||
Output: > | ||
I also haven't covered {magrittr}, which is commonly used, but currently | ||
this package is undergoing a major overhaul to magrittr 2.0, so I will wait | ||
to see what I want to include in the lesson. | ||
## demo_lesson(7) | ||
- Class: text | ||
Output: > | ||
Again, as we saw with {rvest}, tidyverse alone may not be an answer to | ||
everything. Look up StackOverflow if you have specific needs that are not | ||
met. | ||
## demo_lesson(8) | ||
- Class: text | ||
Output: > | ||
* If you work with large datasets, I urge you to check out {data.table} by | ||
Matt Dowle at https://github.com/Rdatatable/data.table. | ||
* If you work a lot with machine learning, check out {caret} by Max Kuhn | ||
at https://topepo.github.io/caret/. | ||
* {xtable} is a great package to export your data/model summaries into | ||
tables, especially LaTeX files. This will be extremely useful in making | ||
your results reproducible. | ||
# OUTRO ======================================================================== | ||
- Class: text | ||
Output: > | ||
Check back for more updates on swirl-tidy! Good luck on your R journey. | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Overview | ||
Introduction_to_tibbles | ||
Introduction_to_pipes | ||
Import_with_readr | ||
Import_with_haven | ||
Import_with_readxl | ||
Import_with_rvest | ||
Tidy_with_tibble | ||
Tidy_with_tidyr | ||
Transform_with_dplyr_I | ||
Transform_with_dplyr_II | ||
Transform_with_dplyr_III | ||
Transform_with_dplyr_IV | ||
Transform_with_forcats | ||
Transform_with_stringr | ||
Transform_with_lubridate | ||
Program_with_purrr | ||
Visualize_with_ggplot2_I | ||
Visualize_with_ggplot2_II | ||
Visualize_with_ggplot2_III | ||
Epilogue |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Put custom tests in this file. | ||
|
||
# Uncommenting the following line of code will disable | ||
# auto-detection of new variables and thus prevent swirl from | ||
# executing every command twice, which can slow things down. | ||
|
||
# AUTO_DETECT_NEWVAR <- FALSE | ||
|
||
# However, this means that you should detect user-created | ||
# variables when appropriate. The answer test, creates_new_var() | ||
# can be used for for the purpose, but it also re-evaluates the | ||
# expression which the user entered, so care must be taken. |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Code placed in this file fill be executed every time the | ||
# lesson is started. Any variables created here will show up in | ||
# the user's working directory and thus be accessible to them | ||
# throughout the lesson. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
- Class: meta | ||
Course: swirl | ||
Lesson: Model_with_tidymodels | ||
Author: Seo-young Silvia Kim | ||
Type: Standard | ||
Organization: American University | ||
Version: 0.1.0 | ||
|
||
# INTRO ======================================================================== | ||
- Class: text | ||
Output: > | ||
(THIS LESSON IS A PLACEHOLDER FOR FUTURE DEVELOPMENT. CHECK BACK LATER!) | ||
Welcome back! Today we will continue to explore how to do statistical models | ||
using {tidymodels} package. When you see ..., press Enter. | ||
- Class: cmd_question | ||
Output: >- | ||
Run {install.packages("tidymodels")}, if it is not already installed. | ||
This is tidymodels not tidyverse!! | ||
You can type "skip()" if this package is already installed. | ||
Remember to close all other sessions of R (if Windows) before this step. | ||
Otherwise, you may run into error messages such as 'Warning in | ||
install.packages : installation of package ‘XXX’ had non-zero exit status'. | ||
CorrectAnswer: if (!require("tidymodels")) install.packages("tidymodels") | ||
AnswerTests: >- | ||
any_of_exprs( | ||
'install.packages(pkgs = "tidymodels")', | ||
'if (!require("tidymodels")) install.packages(pkgs = "tidymodels")', | ||
'skip()' | ||
) | ||
Hint: 'If the package is already installed, type skip().' | ||
|
||
- Class: cmd_question | ||
Output: 'Now load the tidymodels package.' | ||
CorrectAnswer: library("tidymodels") | ||
AnswerTests: any_of_exprs('library(tidymodels)', 'library("tidymodels")') | ||
Hint: 'Avoid using {require}. Use {library}.' | ||
|
||
# PREAMBLE ===================================================================== | ||
## demo_lesson(4) | ||
- Class: text | ||
Output: >- | ||
Just like the tidyverse, tidymodels is a *collection* of packages, such as | ||
{parsnip}, {recipes}, and so on. | ||
## demo_lesson(5) | ||
## demo_lesson(6) | ||
## demo_lesson(7) | ||
## demo_lesson(8) | ||
## demo_lesson(9) | ||
## demo_lesson(10) | ||
## demo_lesson(11) | ||
## demo_lesson(12) | ||
## demo_lesson(13) | ||
## demo_lesson(14) | ||
## demo_lesson(15) | ||
## demo_lesson(16) | ||
## demo_lesson(17) | ||
## demo_lesson(18) | ||
## demo_lesson(19) | ||
## demo_lesson(20) | ||
## demo_lesson(21) | ||
## demo_lesson(22) | ||
## demo_lesson(23) | ||
## demo_lesson(24) | ||
## demo_lesson(25) | ||
|
||
# OUTRO ======================================================================== | ||
- Class: text | ||
Output: >- | ||
You have completed "Model with tidymodels" lesson of swirl-tidy! | ||
This is the last lesson as of version 0.1.0. | ||
Congratulations on making this far. You've done really well! | ||
Drop in to see what could be future development in "Epilogue". | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.