Description Usage Arguments Details Value Note See Also Examples
Checks a students interval against a correct one.
1 2 | grade.interval(correctans, studentans, tolerance=0.01, useeval=TRUE,
usena=FALSE, useinf=FALSE, quiet=TRUE)
|
correctans |
a vector of type |
studentans |
a vector of type |
tolerance |
a |
useeval |
|
usena |
|
useinf |
|
quiet |
|
usena is ignored in this function. If set to true,
grade.interval sets it back to false and produces a warning
message.
grade.interval expects correctans to be a vector of
length 2, if not it errors out.
If correctans is in reverse order and quiet=FALSE,
grade.interval issues a warning, but continues grading.
TRUE or FALSE indicating match success or failure respectively.
FALSE is also returned if studentans does not look like an interval.
The grade main page contains a discussion of the
common parameters correctans, studentans, useeval, usena,
useinf, quiet.
1 2 3 4 | grade.interval(c(1,2), "[1,2]") # TRUE
grade.interval(c(1,2), "[1.1,2]", tolerance=".01") # FALSE
grade.interval(c(1,pi), "(1,3.142)", tolerance=".001") # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.