Online Statistics Teaching with R using `learnr interactive lessons - - PowerPoint PPT Presentation

online statistics teaching with r
SMART_READER_LITE
LIVE PREVIEW

Online Statistics Teaching with R using `learnr interactive lessons - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1
  • Dr. Amira Elayouty and Dr. Mitchum Bock July 2020

Owing a debt of gratitude to Dr. Mine Çetinkaya-Rundel and the gang at RStudio

Online Statistics Teaching with R

using `learnr’ interactive lessons and tutorials

slide-2
SLIDE 2

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

slide-3
SLIDE 3

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.
slide-4
SLIDE 4

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.

Some challenges to remote teaching with

slide-5
SLIDE 5

Introductory Statistics

4 x 2hrs computing labs

Taught MSc Course

10 x 2hrs computing labs

learnr gradethis

slide-6
SLIDE 6

Learnr

https://rstudio.github.io/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.

slide-7
SLIDE 7

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.

slide-8
SLIDE 8

Just like R markdown, it starts with a YAML You can further customise the style/font of the learnr tutorial.

to render figures with captions for "Continue" buttons between subsections to allow skipping exercises

https://rstudio.github.io/learnr/

slide-9
SLIDE 9

narrative code console narrative code console

slide-10
SLIDE 10

Code exercise Multiple choice question

slide-11
SLIDE 11

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

slide-12
SLIDE 12

In the setup chunk,

slide-13
SLIDE 13

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()
slide-14
SLIDE 14

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
slide-15
SLIDE 15

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.
slide-16
SLIDE 16
  • Environmental case study lab (University of Glasgow)
  • Introducing learnr
  • learnr for remote teaching
  • Introducing gradethis
  • Mine Çetinkaya-Rundel's workshop on teaching with learnr
slide-17
SLIDE 17

Thank you…