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(tidyverse) | |
| packageVersion("dplyr") | |
| library(lubridate) | |
| library(glue) | |
| set.seed(1234) | |
| children <- tribble( |
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
| --- | |
| output: learnr::tutorial | |
| runtime: shiny_prerendered | |
| --- | |
| ```{r setup, include=FALSE} | |
| library(learnr) | |
| ``` | |
| ## Exercise with Hint |
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(tidyverse) | |
| library(rtweet) | |
| library(glue) | |
| tml <- get_timelines("JeffisTallguy", n = 200) | |
| yesterday <- tml %>% | |
| filter(is.na(reply_to_screen_name)) %>% | |
| slice( | |
| which(str_detect(text, "Yesterday by the Beatles is a pretty solid song")): |
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
| --- | |
| output: learnr::tutorial | |
| runtime: shiny_prerendered | |
| --- | |
| ```{r setup, include=FALSE} | |
| library(learnr) | |
| ``` | |
| ## Exercise with Hint |
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(friends) # devtools::install_github("EmilHvitfeldt/friends") | |
| library(tidyverse) | |
| you_guys <- friends %>% | |
| mutate(text = tolower(text)) %>% | |
| filter(str_detect(text, "you guys")) %>% | |
| count(speaker, sort = TRUE) | |
| you_guys | |
| #> # A tibble: 70 x 2 |
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
| # Load packages ---------------------------------------------------------------- | |
| library(tidytext) | |
| library(friends) | |
| library(tidyverse) | |
| # The six friends -------------------------------------------------------------- | |
| six_friends <- c("Phoebe Buffay", "Chandler Bing", "Rachel Green", "Monica Geller", "Joey Tribbiani", "Ross Geller") |
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
| body { | |
| font-size: 16px; | |
| } | |
| .topicsList .topic { | |
| font-size: 18px; | |
| } | |
| p.caption { | |
| font-size: 0.6em; | |
| } |
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(tidyverse) | |
| lms_export <- tribble( | |
| ~Name, ~`Student ID`, ~`HW 01 [Total Pts: 100 Score] |so many more characters`, ~`and many more columns`, | |
| "Dorianne Grey", 12345, NA, NA, | |
| "Krista Rose", 67890, NA, NA | |
| ) | |
| hw_scores <- tribble( | |
| ~student_id, ~score, |
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
| # Find on RStudio Cloud: https://bit.ly/tidypumpkin | |
| # inspirations ----------------------------------------------------------------- | |
| # https://twitter.com/alyssastweeting/status/1450270826347913220 | |
| # https://twitter.com/Emma_McHuge/status/1450434288319537162 | |
| # load packages ---------------------------------------------------------------- | |
| library(tidyverse) |