bioconnector / workshops

Bioconnector Workshops
http://bioconnector.github.io/workshops
Other
32 stars 40 forks source link

setup & loading in lessons: library(tidyverse) #16

Closed stephenturner closed 7 years ago

stephenturner commented 8 years ago

https://twitter.com/hadleywickham/status/773264703711617024

The tidyverse package installs and loads pretty much all the tidy packages we use here - ggplot2, dplyr, readr, tidyr, tibble, stringr, broom, etc.

Once this hits CRAN (next week?) change setup instructions and lesson-specific library calls.

stephenturner commented 8 years ago

added tidyverse to setup instructions but still haven't changed it in the lessons yet.

stephenturner commented 8 years ago

Huge list of places in lessons where you could update this. Not sure if I want to or not. @vpnagraj - you're teaching these lessons. If you want to instruct people to load tidyverse instead of each specific library, feel free to go through and start to change some of these.

- [ ] data.Rmd:11:suppressPackageStartupMessages(library(dplyr)) - [ ] handouts.Rmd:11:suppressPackageStartupMessages(library(dplyr)) - [ ] r-dataframes.Rmd:37:library(readr) - [ ] r-dataframes.Rmd:38:library(dplyr) - [ ] r-dataframes.Rmd:98:library(ggplot2) - [ ] r-dataframes.Rmd:140:library(readr) - [ ] r-dataframes.Rmd:141:library(dplyr) - [ ] r-dataframes.Rmd:142:library(tidyr) - [ ] r-dataframes.Rmd:143:library(ggplot2) - [ ] r-dplyr-yeast.Rmd:12:library(ggplot2) - [ ] r-dplyr-yeast.Rmd:37:library(readr) - [ ] r-dplyr-yeast.Rmd:38:library(dplyr) - [ ] r-dplyr-yeast.Rmd:85:library(dplyr) - [ ] r-dplyr-yeast.Rmd:114:library(ggplot2) - [ ] r-dplyr-yeast.Rmd:226:library(tidyr) - [ ] r-dplyr-yeast.Rmd:564:library(dplyr) - [ ] r-dplyr-yeast.Rmd:565:library(readr) - [ ] r-dplyr-yeast.Rmd:579:library(dplyr) - [ ] r-dplyr-yeast.Rmd:580:library(readr) - [ ] r-interactive-viz.Rmd:72:library(dplyr) - [ ] r-interactive-viz.Rmd:73:library(readr) - [ ] r-interactive-viz.Rmd:261:library(dplyr) - [ ] r-rmarkdown-homework.Rmd:45:library(dplyr) - [ ] r-rmarkdown-homework.Rmd:46:library(readr) - [ ] r-rmarkdown-homework.Rmd:72:library(ggplot2) - [ ] r-rmarkdown.Rmd:174:catn("library(dplyr)") - [ ] r-rmarkdown.Rmd:175:catn("library(readr)") - [ ] r-rmarkdown.Rmd:216: library(dplyr) - [ ] r-rmarkdown.Rmd:217: library(readr) - [ ] r-rmarkdown.Rmd:274:catn("library(ggplot2)") - [ ] r-rmarkdown.Rmd:283:catn("library(ggplot2)") - [ ] r-rnaseq-airway.Rmd:9:library(ggplot2) - [ ] r-rnaseq-airway.Rmd:19:# library(dplyr) - [ ] r-rnaseq-airway.Rmd:20:# library(readr) - [ ] r-rnaseq-airway.Rmd:118:library(readr) - [ ] r-rnaseq-airway.Rmd:119:library(dplyr) - [ ] r-rnaseq-airway.Rmd:120:library(ggplot2) - [ ] r-shiny.Rmd:67:library(readr) - [ ] r-shiny.Rmd:68:library(dplyr) - [ ] r-shiny.Rmd:69:library(ggplot2) - [ ] r-shiny.Rmd:192:library(readr) - [ ] r-shiny.Rmd:193:library(dplyr) - [ ] r-shiny.Rmd:194:library(ggplot2) - [ ] r-shiny.Rmd:255:library(readr) - [ ] r-shiny.Rmd:256:library(dplyr) - [ ] r-shiny.Rmd:257:library(ggplot2) - [ ] r-shiny.Rmd:325:library(readr) - [ ] r-shiny.Rmd:326:library(dplyr) - [ ] r-shiny.Rmd:327:library(ggplot2) - [ ] r-stats.Rmd:26:library(dplyr) - [ ] r-stats.Rmd:93:# library(dplyr) - [ ] r-stats.Rmd:112:library(dplyr) - [ ] r-stats.Rmd:128:library(readr) - [ ] r-stats.Rmd:250:library(ggplot2) - [ ] r-stats.Rmd:255:library(ggplot2) - [ ] r-tidy.Rmd:9:# library(ggplot2) - [ ] r-tidy.Rmd:42:library(readr) - [ ] r-tidy.Rmd:43:library(dplyr) - [ ] r-tidy.Rmd:57:library(tidyr) - [ ] r-tidy.Rmd:133:library(readr) - [ ] r-tidy.Rmd:134:library(dplyr) - [ ] r-tidy.Rmd:135:library(tidyr) - [ ] r-viz-gapminder.Rmd:12:library(ggplot2) - [ ] r-viz-gapminder.Rmd:30:library(readr) - [ ] r-viz-gapminder.Rmd:31:library(dplyr) - [ ] r-viz-gapminder.Rmd:117:library(ggplot2) - [ ] r-viz-gapminder.Rmd:393:library(dplyr) - [ ] r-viz-gapminder.Rmd:585:library(ggplot2) - [ ] r-viz-gapminder.Rmd:586:library(dplyr) - [ ] r-viz-gapminder.Rmd:587:library(readr)
stephenturner commented 8 years ago

Hey @vpnagraj -- I made a few changes on the setup page without thinking about whether they'd mean anything for your lessons. I moved the knitr and rmarkdown installations to the RMarkdown lesson, so tidyverse is the only generally installed package all around. If you needed knitr or Rmarkdown for those lessons, you could put them in there on top of the other packages you're asking for, or I could stick these back up in the general R installation instructions.

vpnagraj commented 8 years ago

Thanks for the heads up ... I don't think I'm using kntir or rmarkdown in any of the other lessons so should be fine. And I'll consider updating the other calls to tidyverse packages. Honestly kind of ambivalent about it. I've been using tidyverse, and it's definitely a time saver but may be sort of a "black box" for beginners. In other words, it might still be helpful to explicitly load the individual packages for teaching purposes. IDK ...

stephenturner commented 8 years ago

good point. I'll close this issue, no reason to update all those lessons above. I still like the idea of tidyverse in the setup. makes things easier.

stephenturner commented 7 years ago

i'm wondering if we should roll back and load libraries individually rather than tidyverse. pros/cons both ways. tidyverse convenient, but unique in what it does. no other "meta" packages that i know of. @vpnagraj

stephenturner commented 7 years ago

also, i noticed over the summer when folks were trying to install tidyverse, they got some odd errors related to forcats - almost made me think the forcats pkg needed to be installed prior to installing tidyverse.

still undecided whether the convenience of library(tidyverse) is worth the tradeoff to try to explain to beginners the tidyverse as a meta-package, a pretty unique thing in the R world. any thoughts @vpnagraj ?

stephenturner commented 7 years ago

I posed the question to the brand new RStudio community site, and some of the early views already show a consensus leaning toward teaching individual packages to beginners. After reading the comments I agree. I plan on keeping this open until I fix the setup instructions and loading individual packages on each lesson. Let me know if you're on the same page @vpnagraj

http://community.rstudio.com/t/teaching-install-load-packages-individually-or-use-tidyverse-package/71

vpnagraj commented 7 years ago

@stephenturner i'm totally on the same page ... using library(tidyverse) is definitely a convenience, but in terms of teaching i think it feels kind of like a black box

stephenturner commented 7 years ago

fix them here:

stephenturner commented 7 years ago

@vpnagraj i updated all my lessons, and I don't think yours are affected. but I did modify the setup instructions. Please take a look to make sure everything will still work okay on your end. reopen this issue if you spot any problem.