grade.truefalse: Grade True False Answers

Description Usage Arguments Value Note See Also Examples

View source: R/grade.truefalse.R

Description

Checks studentans against correctans. For true/false answers only.

Usage

1
2
grade.truefalse(correctans, studentans, tolerance=0.01,
             useeval=TRUE, usena=FALSE, useinf=FALSE, quiet=TRUE)

Arguments

correctans

TRUE or FALSE or a string

studentans

TRUE or FALSE 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.

Value

TRUE if studentans==correctans AND both studentans and correctans are TRUE or FALSE. FALSE otherwise.

Note

The grade main page contains a discussion of the common parameters correctans, studentans, useeval, usena, useinf, quiet. grade.truefalse does not accept usena or useinf. Setting usena=TRUE or useinf=TRUE will result in a warning. tolerance is not used in grade.truefalse. These arguments are included for compatibility with the other function calls in grade.

See Also

grade

Examples

1
2
3
4
5
grade.truefalse(TRUE, TRUE) # TRUE
grade.truefalse(TRUE, "TRUE") # TRUE
grade.truefalse("FALSE", "TRUE") # FALSE
## depending on your environment settings, this next example may work.
#grade.truefalse("F", F) # TRUE if your environment has not redefined 'F'

grade documentation built on May 2, 2019, 9:15 a.m.