grade.interval {grade} | R Documentation |
Grade Intervals
Description
Checks a students interval against a correct one.
Usage
grade.interval(correctans, studentans, tolerance=0.01, useeval=TRUE,
usena=FALSE, useinf=FALSE, quiet=TRUE)
Arguments
correctans |
a vector of type |
studentans |
a vector of type |
tolerance |
a |
useeval |
|
usena |
|
useinf |
|
quiet |
|
Details
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.
Value
TRUE
or FALSE
indicating match success or failure respectively.
FALSE
is also returned if studentans
does not look like an interval.
Note
The grade
main page contains a discussion of the
common parameters correctans, studentans, useeval, usena,
useinf, quiet
.
See Also
Examples
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