grade.negative: Check the Sign of a Number

Description Usage Arguments Value Note See Also Examples

Description

Sees if studentans is negative, correctans is ignored.

Usage

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

Arguments

correctans

not used in this function, no restrictions are enforced.

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.

Value

TRUE if (studentans < -tolerance) FALSE otherwise.

Note

The grade main page contains a discussion of the common parameters correctans, studentans, useeval, usena, useinf, quiet.

See Also

grade grade.set grade.number

Examples

1
2
3
4
grade.negative(studentans=0, "1") # FALSE
grade.negative(NULL, "1.1", tolerance=".01") # FALSE

grade.negative("soup", "-.1", tolerance=.05) # TRUE

ltjohnson/grade documentation built on May 21, 2019, 8:41 a.m.