list.files()
tb = read.csv("bio233grades20140303.csv", colClasses=c(rep("character",4), rep("numeric",17)))
names(tb)
str(tb)
quizzes = c(10,13,19)
assignments = c(5:9,11,12,14)
practical=c(18)
tb2 = tb[,1:2]
tb2$exam1 = tb[,15] + tb[,16]
tb2$quizz = apply(tb[, quizzes], 1, sum)
tb2$assignments = apply(tb[, assignments], 1, sum)
tb2$practical = tb[,18]
tb3 = tb2
tb3$assignments = 15* tb2$assignments / max(tb2$assignments)
tb3$practical = tb2$practical*5/100
tb3$tot = apply(tb3[,3:6], 1, sum)*100/(50+5+5+15)
rownames(tb3)= tb3$last
summary(tb3)
tb4 = tb3[order(tb3$tot), ]
No comments:
Post a Comment