mark | R Documentation |
For Rmd submissions of reports and other coursework. Function checks word count and inserts space for feedback.
mark( file = NULL, file_name = file, study = NULL, mark = NULL, rubric_grades = NULL, rubric = NULL, include_rubric_desc = F, feedback = F, fdbck_boiler_text = NULL, rubric_url = NULL, flowchart_url = NULL, quick_comment_url = NULL, count_words = !feedback, limit = 2000, include_results = F, results_obj = NULL, format_comments = T, collapse_chunks = F, color = "#b38ed2", text = NULL, install_missing_pkgs = F, installed_pkgs = NULL, preview = F )
file |
|
file_name |
|
study |
|
mark |
|
rubric |
A named list containing the rubric criteria (c1, c2, etc). Each criterion should be a list with |
include_rubric_desc |
|
feedback |
|
fdbck_boiler_text |
|
rubric_url |
|
flowchart_url |
|
quick_comment_url |
|
count_words |
|
limit |
|
include_results |
|
results_obj |
See |
format_comments |
|
collapse_chunks |
|
color |
|
text |
Alternative way of providing input from object rather than file. Requires |
install_missing_pkgs |
|
installed_pkgs |
|
preview |
|
rubric_grades. |
Mark for each rubric criterion. Can be a factor with levels sorted from lowest mark to highest mark. See |
Function run with feedback = FALSE
will overwrite the original Rmd file and knit it into HTML. This should be done before marking in order to automate word count, include correct results, and additional marking tools (see rubric_url
, flowchart_url
, and quick_comment_url
). The overwritten Rmd should then be used for comments and feedback. Once done, mark(feedback = TRUE)
should be run on the edited Rmd. This will output a ..._marked.html file that can be returned to students.
Initial run of mark(feedback=F)
inserts an empty feedback section into Rmd with three placeholders: THE GOOD, THE BAD, and RECOMMENDATIONS. These are then replaced with boilerplate text passed to fdbck_boiler_text
. If the argument is not used, function defualts to using text in file.path(path.package("teachR"), "fdbck_boilerplate.txt")
. Any external file passed to the argument should follow the same structure.
If install_missing_pkgs == TRUE
and installed_pkgs
is NULL
, a vector of installed packages will be retrieved internally. This will slow things down if the function is run iteratively so it's best to provide installed_pkgs
.
In-text comments can be inserted into .Rmd file on a lew line surrounded by <–!/tag/ –>, where /tag/ is one of: warn, c1, c2, c3, c4, c5.
If output .Rmd and .html files were successfully created and if count_words == TRUE
, returns list of $word_count
and $rendered=TRUE
. If count_words == FALSE
, only returns a single TRUE
. Otherwise returns an error.
# first run mark("C:/work/201000.Rmd", ...) # then mark("C:/work/201000.Rmd", feedback = T, ...)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.