Online Statistics Teaching with R using `learnr’ interactive lessons and tutorials Dr. Amira Elayouty and Dr. Mitchum Bock July 2020 Owing a debt of gratitude to Dr. Mine Çetinkaya-Rundel and the gang at RStudio
Teaching Statistics with Level 1 “Introductory Statistics” • Optional course (not a prerequisite) • > 50% DON’T go on to Honours Stats • We don’t expect them to write R code (but encourage them to explore!) Level M “Data Analysis Skills” • Compulsory taught MSc course • Covers a wide range of statistical techniques from other courses with emphasis on application • Essential that they can write R code efficiently and reproducibly
Some challenges to remote teaching with Students: • have different types of machines with different operating systems; • need to install R, RStudio and packages in R; • may not have any/limited background in R or RStudio.
Some challenges to remote teaching with WE, as educators, want to… • engage students in active learning (especially remotely); • enable students to apply/test their understanding; • guide the student towards effective R code; “Not all R error and warning messages are useful; especially for beginners” • provide the student with useful and meaningful feedback; • reduce dependency on personal help by encouraging independent learning.
Taught MSc Course Introductory Statistics 10 x 2hrs computing labs 4 x 2hrs computing labs learnr gradethis
Learnr • learnr is an R package that easily turn Rmarkdown documents into interactive tutorials. • learnr is on CRAN which can be installed using: install.packages(“learnr”) • learnr tutorials can include: Narrative, figures, illustrations, and equations. Code exercises ( R code chunks that users can edit and execute directly). Quiz questions. Videos (YouTube & Vimeo). Interactive Shiny components. https://rstudio.github.io/learnr/
Learnr • learnr is an R package that easily turn Rmarkdown documents into interactive tutorials. • learnr is on CRAN which can be installed using: install.packages(“learnr”) • learnr tutorials can include: Narrative, figures, illustrations, and equations. Code exercises ( R code chunks that users can edit and execute directly). Quiz questions. Videos (YouTube & Vimeo). Interactive Shiny components. https://rstudio.github.io/learnr/
Just like R markdown , it starts with a YAML for "Continue" buttons between subsections to allow skipping exercises to render figures with captions You can further customise the style/font of the learnr tutorial. https://rstudio.github.io/learnr/
narrative code console narrative code console
Code exercise Multiple choice question
gradethis • gradethis pairs with the learnr package; It provides multiple methods to grade learnr exercises: grade_result(): checks the final result of exercise code grade_conditions(): checks code against a set of specified conditions grade_code(): checks code against a solution code • gradethis is not on CRAN yes but can be installed from Github with: remotes::install_github(“rstudio-education/gradethis”) https://rdrr.io/github/rstudio-education/gradethis
In the setup chunk,
Tips: • Think of what may students get wrong & write test cases for with useful guidance to success. • Write a generic message for all other possible mistakes. • More grading options/functions: grade_code() , grade_Conditions() . • More details on those functions are available in gradethis::gradethis_demo()
Sharing the lesson with students • Deploy on: local shiny server of the school/organisation (2018, 2019) - requires IT support shinyapps.io (2020) - Not free for large number of students Note: To publish a tutorial with gradethis ; you need to run devtools::install_github(“rstudio/packrat”) in your console first • You can also distribute the learnr tutorial in R package (compatible with the latest version of RStudio, for more details see https://cran.r-project.org/web/packages/learnr/vignettes/shinyapps-publishing.html • Step by step publishing instructions are at https://rstudio.github.io/learnr/publishing.html
Lessons learned … • Make the tutorial experience feel more like a self explanatory story. • Write robust code and checks & verify the correctness of these tests. • Make static .pdf versions of the tutorial/lesson available. • Make a static .pdf file with solutions available after class.
• Environmental case study lab (University of Glasgow) • Introducing learnr • learnr for remote teaching • Introducing gradethis • Mine Çetinkaya-Rundel's workshop on teaching with learnr
Thank you…
Recommend
More recommend