grade.number {grade} | R Documentation |
Checks studentans
against correctans
. For scalars only.
grade.number(correctans, studentans, tolerance=0.01, useeval=TRUE, usena=FALSE, useinf=FALSE, quiet=TRUE)
correctans |
a vector of type numeric or a string |
studentans |
a vector of type numeric or a string |
tolerance |
a string or numeric representing the accepted component wise tolerance |
useeval |
TRUE or FALSE indicates whether or not to use 'eval' on strings |
usena |
TRUE or FALSE indicating whether or not NA is an accepted value |
useinf |
TRUE or FALSE indicating whether or not Inf and -Inf are accepted values |
quiet |
TRUE or FALSE . If TRUE there are more warning messages when checks fail. Can be helpful for debugging. |
TRUE
if studentans
is within tolerance
of
correctans
. FALSE
otherwise.
The grade
main page contains a discussion of the
common parameters correctans, studentans, useeval, usena,
useinf, quiet
.
grade
grade.set
grade.negative
grade.number(1, "1") # TRUE grade.number(1, "1.1", tolerance=".01") # FALSE grade.number(pi, "3.142", tolerance=".001") # TRUE grade.number(1, "[1]") # TRUE