Learn R Programming

ProfessR (version 2.1)

do.grades: Do Grades

Description

Calculate the grades of a class of students, given raw scores on exam

Usage

do.grades(ggrades, divs = NULL, cut = 0, tit = "Exam Grades",
breaks=length(ggrades)/3, ...)

Arguments

ggrades
Raw grades
divs
divisions for grades (optional)
cut
low end Cut off to remove 0 from statistics
tit
Title for Figure
breaks
breaks for the histogram, default=length(ggrades)/3
...
other parameters for hist

Value

  • grades=ggrades, lett=letts, scor=scores, divs=divs, LETS=LETS, SCRS=SCRS, hist=HA LIST:
  • gradesraw scores
  • lettletter grades
  • scorscaled grades
  • divsdivisions, estimated by user or provided as input
  • LETSletter grades assigned
  • SCRSScores related to LETS
  • histhistogram structure

Details

To remove students who do not take the test a low end cut off is used to excise any grades below that level. Both mean, and standard deviations are shown as well as median and quartiles.

See Also

jist, DUMPgrades, getlet

Examples

Run this code
g = rnorm(n=130, m=82, sd=10)
g[g>100] = 100
g[g<1] = 1

B = boxplot(g)

##########   set divisions automatically:

divs = c(min(g), B$stats[1:4] + diff(B$stats)/2, max(g) )



###  to run interactively, remove the divs
###  D1 = do.grades(g, tit="GEOL 105 Exam 1")

### otherwise use previously calculated divs:
D1 = do.grades(g, divs=divs, tit="GEOL 105 Exam 1")

####  this is interactive
D1 = do.grades(g, tit="GEOL 105 Exam 1")

#######  list the grades:
cbind(D1$grades,  D1$lett,  D1$scor)

####### if you have names or ID's try:
#######  cbind(IDs, D1$grades,  D1$lett,  D1$scor)

\dontrun{

 DUMPgrades(D1, file="TEST1grades", id=IDS )
}

Run the code above in your browser using DataLab