Title: | Helps Grade Assignment Submissions that are R Scripts |
Version: | 1.0.10 |
Description: | After being given the location of your students' submissions and a test file, the function runs each .R file, and evaluates the results from all the given tests. Results are neatly returned in a data frame that has a row for each student, and a column for each test. |
Depends: | R (≥ 3.4) |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
Imports: | testthat, methods, callr, jsonlite |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2021-09-03 16:40:54 UTC; taylor |
Author: | Taylor Brown [aut, cre] |
Maintainer: | Taylor Brown <trb5me@virginia.edu> |
Repository: | CRAN |
Date/Publication: | 2021-09-03 16:50:02 UTC |
gradeR: Helps Grade Assignment Submissions that are R Scripts
Description
After being given the location of your students' submissions and a test file, the function runs each .R file, and evaluates the results from all the given tests. Results are neatly returned in a data frame that has a row for each student, and a column for each test.
Author(s)
Maintainer: Taylor Brown trb5me@virginia.edu
The grading function.
Description
This function grades a bunch of R script assignments
Usage
calcGrades(
submission_dir,
your_test_file,
suppress_warnings = TRUE,
verbose = FALSE
)
Arguments
submission_dir |
where the assignments are located |
your_test_file |
the path to your testthat test file (e.g. grade_hw1.R) |
suppress_warnings |
warning handlers prevent code from being run after they catch something. Suppress this behavior by setting this argument to TRUE. |
verbose |
set to true if you want to print the name of the file as it's being ran |
Examples
# change paths to *your* paths
submissions <- "extdata/example/assignment1_submissions/"
my_test_file <- system.file("extdata/example", "grade_hw1.R", package = "gradeR")
results <- calcGrades(submissions, my_test_file)
The grading function for Gradescope.
Description
This function grades one R script assignment submission and writes results out to a properly-formatted json file for Gradescope.
Usage
calcGradesForGradescope(
submission_file,
test_file,
which_results = "gradescope",
suppress_warnings = TRUE
)
Arguments
submission_file |
the name of the assignment submission file (e.g. "hw1.r") |
test_file |
the name of the .r file with test_that tests (e.g. "hw1_tests.R") |
which_results |
Choose either "testing" or "gradescope" If equal to "gradescope" then the json file is written out to the directory that Gradescope expects. Otherwise, results.json is written to your current working directory. |
suppress_warnings |
If FALSE, warnings are fatal; if set to TRUE, then warnings will not prematurely terminate running of student submission scripts. |
This function finds unreadable files.
Description
A function that finds student submissions with poorly encoded characters
Usage
findBadEncodingFiles(submission_dir)
Arguments
submission_dir |
where the assignments are located |
Examples
# change paths to *your* paths
submissions <- "extdata/assignment1_submissions/"
findBadEncodingFiles(submissions) # perhaps ask these students to resubmit
This function finds files with global file paths.
Description
A function that finds student submissions that refer to machine-specific file paths
Usage
findGlobalPaths(submission_dir)
Arguments
submission_dir |
where the assignments are located |
Examples
# change paths to *your* paths
submissions <- "extdata/assignment1_submissions/"
findGlobalPaths(submissions) # perhaps ask these students to resubmit