convert_grades convert letter grades to numeric marks

convert_grades(grades, to = NA, scale = glasgow22())

Arguments

grades

vector of letter or number grades

to

convert to letters or numbers (default NA converts to other type)

scale

conversion table containing letters and numbers

Value

vector

Examples

convert_grades("A1") # convert from letter to number
#> [1] 22
convert_grades(1:22) # convert from number to letter
#> [1] "G2" "G1" "F3" "F2" "F1" "E3" "E2" "E1" "D3" "D2" "D1" "C3" "C2" "C1" "B3" #> [16] "B2" "B1" "A5" "A4" "A3" "A2" "A1"
# make all letter grades the same case convert_grades(c("a1", "B2", "c3"), "letters")
#> [1] "A1" "B2" "C3"