Last active
January 30, 2016 15:09
-
-
Save xoolive/bcf4a0941d647963a638 to your computer and use it in GitHub Desktop.
Distribution of grades in a student group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grades <- read.csv("grades.csv") | |
# I like to have first name, last name, grade | |
# Adapt the column number to your needs | |
x <- as.numeric(as.character(grades[,3])) | |
# Export to png? | |
# png("grades.png") | |
# Adapt the breaks to your grades | |
hist(x, col="lightgreen", freq=FALSE, breaks=seq(10,20,by=.5), family="Ubuntu") # I trashed Arial | |
# Play with the adjust (default: 1) parameter in density | |
lines(density(x[!is.na(x)]), col = "red", lwd = 2) | |
# Close png file | |
# dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment