gradr is pretty basic at this point. read_grades() reads a grade sheet and converts it to a grade_list object. curve_grades() calls the specific grade curving algorithm - of which, at this point, only linear_transform() is implemented.

To use, read in a grade list object with read_grades() (or convert a data frame to a grade list object with as_grade_list()).

library(rlang)
library(dplyr)
g <- read_grades("~/Dropbox (Personal)/Drew/Teaching/2017/GEOL456_2017/exams/exam_2_grades.csv", id.col = quo(Last), raw.grade.col = quo(raw))
head(g)

Next, use curve_grades() to curve the grades. curve_grades() requires a grade list object as well as a curving algorithm - although at the moment only the linear_transform() algorithm is supported.

g_a <- curve_grades(g, method="linear", min.adj=60)

readr::write_csv(g_a, "~/Dropbox (Personal)/Drew/Teaching/2017/GEOL456_2017/exams/exam_2_grades_curved.csv")

Later I will implement some plotting methods, but for now plotting and reshaping must be done by hand.

# Gather raw and adjusted for comparison
g_a_m <- tidyr::gather(g_a, key=grade.type, value=grade, raw:grades.adj)
p_side_by_side <- ggplot(g_a_m, aes(x=grade)) + 
  geom_histogram() + 
  geom_rug(sides="b") + 
  scale_x_continuous(limits = c(40, 105), breaks=seq(from=40, to=100, by=5)) +
  facet_wrap(~grade.type)
# ggsave("~/Dropbox (Personal)/Drew/Teaching/2017/GEOL456_2017/exams/exam_2_grades.png", height=4, width=6, units="in", dpi=300)
print(p_side_by_side)

I've also half-way implemented functions to assign letter grades and to show them as vertical lines on plots, but I haven't fully implemented those.



adsteen/gradr documentation built on Dec. 18, 2017, 4:45 a.m.