Skip to content

Instantly share code, notes, and snippets.

@piotrekwitkowski
Created July 7, 2019 14:11
Show Gist options
  • Save piotrekwitkowski/eb81588a99bc1f398370aaf02f6b3b77 to your computer and use it in GitHub Desktop.
Save piotrekwitkowski/eb81588a99bc1f398370aaf02f6b3b77 to your computer and use it in GitHub Desktop.
### Task 2
png(filename = "HistogramExams.png")
hist(
exam,
# breaks=seq(from=1.0, to=5.0, by=0.1),
breaks = c(0, 0.3, 0.7, 1.0, 1.3, 1.7, 2.0, 2.3, 2.7, 3.0, 3.3, 3.7, 4.0, 4.3, 4.7, 5.0),
xlim = c(0, 5),
freq = TRUE,
xlab="Grades",
ylab="# of Grades",
col="orange")
dev.off()
png(filename = "BoxplotExams.png")
boxplot(
exam,
horizontal = TRUE,
boxwex = 0.3,
xlab="Grades",
ylab="median: 2.3",
col="darkgreen")
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment