Barry Grant < http://thegrantlab.org/bimm143/ >
2019-09-06 (13:55:06 on Fri, Sep 06)

Background

The goal of this hands-on session is …Add Your Class Text Here

This template text, from the labsheet package, demonstrates how instructors can create interactive web documents that students can use for enhanced self-guided learning beyond that offered by conventional Rmarkdown/HTML documents.

Functions from this package are intended to be used within Rmarkdown documents as inline R code to create a range of HTML widgets (text boxes, pull down menus, and buttons that reveal hidden content such as hints and solutions). Feedback and counting of correct answers is provided via javascrip. At its most basic this allows students to answer questions, evaluate their responses and provide extra hints and solutions as required. A number of these features are based on on ideas from Software Carpentry and functions from the webex and learnr packages.

Examples

Example labsheet function use is given below. Knit this file to HTML to see how it works.

Side-note: To fully engage with this worksheet please provide your answers in the red rectangles after each question. Correct answers will be indicated by a change of rectangle color. For example, type 2 in the first question box and note color change:

  • Q. What is 1+1?
  • Q. Type a vowel:
  • Q. Complete, “Never gonna give you up, never gonna:
  • Q. True or False? You can permute values in a vector using sample().

Buttons such as this one can be used to provide additional hints, background information, or answers on an optional basis (i.e. click to hide/reveal this content).

We recommend that you attempt the questions before revealing these additional details.

Plot problem

Recreate the scatterplot below, using the built-in cars dataset.

See the documentation for plot() (?plot)

About this document

Here we use the sessionInfo() function to report on our R systems setup at the time of document execution.

## R version 3.6.0 (2019-04-26)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS High Sierra 10.13.6
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] labsheet_0.1.2
## 
## loaded via a namespace (and not attached):
##  [1] compiler_3.6.0  magrittr_1.5    tools_3.6.0     htmltools_0.3.6
##  [5] yaml_2.2.0      Rcpp_1.0.2      stringi_1.4.3   rmarkdown_1.15 
##  [9] knitr_1.24      jsonlite_1.6    stringr_1.4.0   xfun_0.9       
## [13] digest_0.6.20   evaluate_0.14