comprehension

references:
- ISI, example 9.1, p.476

library(tidyverse)

simulation

data

comprehension <- read.csv("Comprehension.csv")
comprehension$Condition <- factor(comprehension$Condition,
                                  levels = c("Before", "After", "None"))
str(comprehension)
## 'data.frame':    57 obs. of  2 variables:
##  $ Condition    : Factor w/ 3 levels "Before","After",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Comprehension: int  6 5 4 2 1 3 5 3 3 2 ...
tbl <- comprehension %>%
  group_by(Condition) %>%
  summarize(mean = mean(Comprehension))
tbl
## # A tibble: 3 x 2
##   Condition     mean
##      <fctr>    <dbl>
## 1    Before 4.947368
## 2     After 3.210526
## 3      None 3.368421

Barplot.

ggplot(tbl, aes(x = Condition, y = mean, fill = Condition)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = c("azure", "bisque", "skyblue")) +
  labs(title = "Comprehension")