preview: Preview marked HTML report in RStudio Viewer

View source: R/preview.R

previewR Documentation

Preview marked HTML report in RStudio Viewer

Description

Wrapper for teachR::mark() producing a temporary preview of commented HTML file in the RStudio Viewer pane.

Usage

preview(
  file,
  show_rmd = F,
 
    rubric_url = "https://raw.githubusercontent.com/SussexPsychMethods/and_pub/master/marking/sussex_rubric.R",
 
    fdbck_boiler_text = "https://raw.githubusercontent.com/SussexPsychMethods/and_pub/master/marking/fdbck_boilerplate.txt",
  install_missing_pkgs = F,
 
    rubric_btn_url = "https://mivalek.github.io/adata/marking/rubric_and_criteria_faq.html",
 
    flowchart_url = "https://raw.githubusercontent.com/mivalek/mivalek.github.io/master/adata/marking/AnD_report_flowchart.png",
  quick_comment_url = "https://mivalek.github.io/adata/marking/quick_comments.html",
  button_urls = "https://mivalek.github.io/adata/marking",
  height = "maximize"
)

Arguments

file

Either path to .Rmd file to mark or, if working directory is set to the folder containing the file, ID number.

rubric_url

character. A named list containing the rubric criteria (c1, c2, etc). Each criterion should be a list with name, col, and text elements containing the name, colour, and description of the criterion, respectively.

fdbck_boiler_text

character. Optional path to boilerplate text to be used in the Feedback sections. See teachR::mark()

rubric_btn_url

cahracter. URL to a webpage containing markng rubric/criteria/guidelines for markers' quick reference.

flowchart_url

cahracter. URL to a webpage containing report flowchart students were supposed to follow. Also for for markers' quick reference. Can be either a .html file or image.

quick_comment_url

cahracter. URL to a (Google?) spreadsheet containing quick comments for convenient marking.

Details

Function knits the file in the temp directory (tempdir() and opens it in RStudio's Viewer pane. Neither gubric grades nor marks are rendered. It requires all packages used in the Rmd report to be installed beforehand.

Examples

preview(file = "marking/AnD/2019-20/48323.Rmd")

mivalek/teachR documentation built on Aug. 26, 2022, 6 a.m.