Learn R Programming

ProfessR (version 2.1)

droplowest: Drop lowest grade

Description

Drop the lowest grade from a matrix of grades. Matrix is assumed to be N by m where m is the number of exams (columns), N the number of students (rows)

Usage

droplowest(z)

Arguments

z
Matrix of scores, rows are students, columns are exam scores

Value

  • minindIndex of minimum score
  • bestmatrix of scores with the lowest dropped
  • midgrademean value of best scores

Details

Best matrix output is sorted, so the grades do not reflect the original order of exam scores. To drop the two lowest scores, apply this program twice, running it a second time on the best outut.

See Also

do.grades

Examples

Run this code
#########   generate fake exam scores, 10 students, 3 exams
z = matrix(runif(3*10, 50, 100), ncol=3   )
 A  = droplowest(z)
 cbind(A$best,  A$minind, z, A$midgrade)

Run the code above in your browser using DataLab