Created: r Sys.time()
library(knitr) knitr::opts_chunk$set(list(echo=TRUE, eval=TRUE, cache=FALSE, warning=FALSE, message=FALSE)) opts_chunk$set(fig.width = 10, fig.height = 10) library(stringr) library(tidyverse) options("download.file.method"="curl")
Assuming that you have installed the edu
-package and that you are happy with the current state of exercises provided by the yml-files in data/
-folder, you can create a new assignment by:
Ctrl+Shift+n
)Addin then prints a generic yaml-header and for each exercise
eval = FALSE
replace_this_with_your_answer()
Also, addin prints a first level heading Correct answers
and repeats all the question with correct answers for own use. (Easier to assist the students when you have the correct answers at hand).
Remove the correct answers (you can save them somewhere) and save the assignment with default answers into regular R-script with a good name, basic_assignments.R
See the gif-image below for the process:
There are several ways for distributing a R-script to your students. You can upload the file somewhere for students to download. If you have your students email addresses, packages like mailR and sendmailR can be used for sending mass emails with attachments.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.