you...
Tools
Cautionary Tale 1:
Old versions of Mac
Cautionary Tale 1:
Old versions of Mac
Most of what you want to teach will work with older versions of R...
... but earlier than R 3.4 is a problem.
Cautionary Tale 1:
Old versions of Mac
Most of what you want to teach will work with older versions of R...
... but earlier than R 3.4 is a problem.
Solution: Have students on old machines use RS Cloud.
Cautionary Tale 2:
Installing on any Mac
Cautionary Tale 3:
All the package headaches
Cautionary Tale 3:
Continued...
Do you want to install from sources the package which needs compilation?
Cautionary Tale 3:
Continued...
Do you want to install from sources the package which needs compilation?
Do you want to install from developer version sources as opposed to CRAN version the package which needs compilation?
Cautionary Tale 3:
Continued...
Do you want to install from sources the package which needs compilation?
Do you want to install from developer version sources as opposed to CRAN version the package which needs compilation?
Cautionary Tale 3:
Continued...
Error in loadNamespace(name) : there is no package called 'here'
or
Error in library(here) : there is no package called 'here'
Cautionary Tale 3:
Continued...
Error in loadNamespace(name) : there is no package called 'here'
or
Error in library(here) : there is no package called 'here'
Cautionary Tale 3:
Continued...
Error in loadNamespace(name) : there is no package called 'here'
or
Error in library(here) : there is no package called 'here'
This means that a dependency didn't auto-install like it should have.
Why?
Cautionary Tale 3:
Continued...
Error in loadNamespace(name) : there is no package called 'here'
or
Error in library(here) : there is no package called 'here'
This means that a dependency didn't auto-install like it should have.
Why?
No idea. Just install the package directly
install.packages("here")
Cautionary Tale 3:
Continued...
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <-i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace 'tibble' 2.1.3 is already loaded, but >= 3.0.0 is required
Cautionary Tale 3:
Continued...
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <-i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace 'tibble' 2.1.3 is already loaded, but >= 3.0.0 is required
This means you're trying to update a package that's in use!
Cautionary Tale 3:
Continued...
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <-i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace 'tibble' 2.1.3 is already loaded, but >= 3.0.0 is required
This means you're trying to update a package that's in use!
Clear out the environment, including "hidden objects"
Close other R/RStudio windows.
Try to install again.
Cautionary Tale 4:
Gen Z doesn't understand folders
Things I have seen students do...
Cautionary Tale 4:
Gen Z doesn't understand folders
Things I have seen students do...
Cautionary Tale 4:
Gen Z doesn't understand folders
Things I have seen students do...
Download a dataset to a random folder, expect it to be read into R automatically.
Never save or knit their R Markdown file. Lose everything when something crashes.
Cautionary Tale 4:
Gen Z doesn't understand folders
Things I have seen students do...
Download a dataset to a random folder, expect it to be read into R automatically.
Never save or knit their R Markdown file. Lose everything when something crashes.
Re-download the lab every time they want to work on it, open it from their downloads folder, copy paste code from a Google Doc.
Cautionary Tale 4:
Gen Z doesn't understand folders
Things I have seen students do...
Download a dataset to a random folder, expect it to be read into R automatically.
Never save or knit their R Markdown file. Lose everything when something crashes.
Re-download the lab every time they want to work on it, open it from their downloads folder, copy paste code from a Google Doc.
Re-download R or RStudio every time they want to open it.
Cautionary Tale 5:
Equality of assessment
Cautionary Tale 5:
Equality of assessment
Using a Studio computer means students taking exams out of their comfort zone...
... but troubleshooting individual laptops during an exam is impossible!
Cautionary Tale 5:
Equality of assessment
Using a Studio computer means students taking exams out of their comfort zone...
... but troubleshooting individual laptops during an exam is impossible!
Not all students can afford the most powerful computer.
Cautionary Tale 5:
Equality of assessment
Using a Studio computer means students taking exams out of their comfort zone...
... but troubleshooting individual laptops during an exam is impossible!
Not all students can afford the most powerful computer.
Not all students have a laptop computer they can bring to class.
Lots of Friction
Lots of Friction
Less Friction
>hello R!
* Çetinkaya-Rundel, Mine. "Teaching R online with RStudio Cloud." RStudio Webinar.
We created RStudio Cloud to make it easy for professionals, hobbyists, trainers, teachers, and students to do, share, teach, and learn data science using R.
A new project in RStudio Cloud
is a new project in RStudio IDE
PSA: If you use RStudio, use projects! Trust me, you won’t regret it.
Good!
Students get experience with code without typing code
Gives them an easy "copy-paste" resource
No need to install or interact with R/RStudio
Good!
Students get experience with code without typing code
Gives them an easy "copy-paste" resource
No need to install or interact with R/RStudio
Not so good...
Apps need to be hosted somewhere
Many students using app at once = high computing demand
Hard to create (for now)
shindig
shindig
R package to create your own exercises
Distribute exercises to students in package form
penguins %>% filter(bill_length_mm > 5) %>% ggplot(aes(x = {quant_var}, fill = {cat_var})) + geom_histogram()
textInput("quant_var", "What quantitative variable?")textInput("cat_var", "What categorical variable?")
decorate_shiny("plot1") %>% shindig("renderPlot")
plotOutput("plot1")
learnr is an R package that makes it easy to create interactive tutorials from R Markdown documents.
Tutorials can include:
learnr is on CRAN
install.packages("learnr")
Start with a YAML, just like in R Markdown:
---title: "Starting with Data"output: learnr::tutorial: progressive: true allow_skip: trueruntime: shiny_prerendered---
learnr
##
, ###
, etc.quiz( question("What position is the letter A in the english alphabet?", answer("8"), answer("14"), answer("1", correct = TRUE), answer("23"), incorrect = "See [here](https://en.wikipedia.org/wiki/English_alphabet) and try again.", allow_retry = TRUE ), question("Where are you right now? (select ALL that apply)", answer("Planet Earth", correct = TRUE), answer("Pluto"), answer("At a computing device", correct = TRUE), answer("In the Milky Way", correct = TRUE), incorrect = paste0("Incorrect. You're on Earth, ", "in the Milky Way, at a computer.") ))
Q: How do I share with my students?
Deploy on
Essential reading:
learnr
/shindig
tutorials?Does your university have server time for hosting learnr
/shindig
tutorials?
If not, does your university have funding sources to host these things elsewhere? (e.g. shinyapps.io)
Does your university have server time for hosting learnr
/shindig
tutorials?
If not, does your university have funding sources to host these things elsewhere? (e.g. shinyapps.io)
Can you acquire funding for RStudio Cloud? Can you charge students to use it?
Does your university have server time for hosting learnr
/shindig
tutorials?
If not, does your university have funding sources to host these things elsewhere? (e.g. shinyapps.io)
Can you acquire funding for RStudio Cloud? Can you charge students to use it?
How much do you enjoy creating/teaching with R resources?
...students should probably have a native install!
...students should probably have a native install!
... consider shindig
tutorials, learnr
tutorials with pre-supplied code, or RS Cloud.
...students should probably have a native install!
... consider shindig
tutorials, learnr
tutorials with pre-supplied code, or RS Cloud.
... consider using R as a back-end only, to make your own life easier.
Thank you!
Allison
atheobol@calpoly.edu
@mtstatistics
@atheobold
Kelly
kbodwin@calpoly.edu
@kellybodwin
@kbodwin
you...
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |