library(ggplot2)
data(GMAT, package = "difNLR")
data <- GMAT[, 1:20]
# total score calculation
df <- data.frame(score = apply(data, 1, sum))
# histogram
g <- ggplot(df, aes(score)) +
geom_histogram(binwidth = 1) +
xlab("Total score") +
ylab("Number of respondents")
g
g + theme_app()
Run the code above in your browser using DataLab