feeding

references:
- ISI, example 6.3, p.346

library(tidyverse)
library(knitr)

data

feeding <- read.delim("BreastFeedIntell.txt")
str(feeding)
## 'data.frame':    322 obs. of  2 variables:
##  $ Feeding: Factor w/ 2 levels "Breastfed","NotBreastfed": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GCI    : num  126.7 124.7 99.8 105 97.3 ...
tbl <- feeding %>%
  group_by(Feeding) %>%
  summarize(mean = mean(GCI),
            s = sd(GCI),
            n = n())
kable(tbl)
Feeding mean s n
Breastfed 105.3 14.49998 237
NotBreastfed 100.9 13.99997 85

Histograms.

ggplot(feeding, aes(GCI)) +
  geom_histogram(color = "saddlebrown", fill = "wheat") +
  facet_grid(Feeding ~ .) +
  labs(title = "BCI")