getRelativeGrade function

Grade operator: difference between two grades

Grade operator: difference between two grades

getRelativeGrade is an operator for grade values.

getRelativeGrade(current_grade, initial_grade)

Arguments

  • current_grade: a string containing the current grade in the form G?, where ? is a number.
  • initial_grade: a string containing the initial grade in the form G?, where ? is a number.

Returns

the grade difference of the current grade relative to the initial grade.

Examples

getRelativeGrade("G4", "G3") ## 1 getRelativeGrade("G5", "G3") ## 2 getRelativeGrade("G2", "G3") ## -1
  • Maintainer: Seung W. Choi
  • License: GPL (>= 2)
  • Last published: 2022-05-18