get_grades: convert integer marks to grades

Description Usage Arguments Value Examples

View source: R/get_grades.R

Description

uses a table of upper and lower points to assign grades

Usage

1
get_grades(marks, grade_tab = NULL, trace = FALSE)

Arguments

marks

vector of integer marks

grades

table of grade boundaries, needs cols: grade, lower, upper

Value

grades

Examples

1
2
3
4
5
library(examMarking)
data_frame(marks = 0:100, grade = get_grades(marks)) %>% 
 ggplot(aes(marks, grade, col = grade)) + 
 geom_line(size = 4) + 
 scale_x_continuous(breaks = seq(0, 100, 5))

jonotuke/examMarking documentation built on Nov. 26, 2019, 3:48 p.m.