Learn R Programming

ProfessR (version 2.4-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)

Value

minind

Index of minimum score

best

matrix of scores with the lowest dropped

midgrade

mean value of best scores

Arguments

z

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

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

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