Chapter 19 Height difference between winners and losers
We plot the Height difference between winners and losers for the grand slams.The data reveals that the Grand Slam winners have shorter heights than losers though the data does not have 19 entries.
grandslam= rbind(ausopen,french,wimbledon,usopen)
summary(grandslam$htdiff)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -16.000 -8.000 -3.500 -1.385 6.250 19.000 19
19.1 Histogram
grandslam %>%
ggplot(aes(x = htdiff)) +
geom_histogram(binwidth = 1,fill = fillColor) +
labs(x= 'Height Difference',y = 'Count', title = paste("Distribution of", ' Height Difference ')) +
theme_bw()
19.2 Density Plot
grandslam %>%
ggplot(aes(x = htdiff)) +
geom_density(fill = fillColor2) +
labs(x= 'Height Difference',y = 'Count', title = paste("Distribution of", ' Height Difference ')) +
theme_bw()
19.3 Tabular data
grandslamhtdiff = grandslam %>% select(winner_name,loser_name,htdiff)
kable(grandslamhtdiff,"html") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive")) %>%
scroll_box(width = "800px")
winner_name | loser_name | htdiff |
---|---|---|
Lindsay Davenport | Martina Hingis | 19 |
Jennifer Capriati | Martina Hingis | 0 |
Jennifer Capriati | Martina Hingis | 0 |
Serena Williams | Venus Williams | -10 |
Justine Henin | Kim Clijsters | NA |
Serena Williams | Lindsay Davenport | -14 |
Amelie Mauresmo | Justine Henin | 8 |
Serena Williams | Maria Sharapova | NA |
Maria Sharapova | Ana Ivanovic | NA |
Serena Williams | Dinara Safina | -7 |
Serena Williams | Justine Henin | 8 |
Kim Clijsters | Na Li | NA |
Victoria Azarenka | Maria Sharapova | NA |
Victoria Azarenka | Na Li | 8 |
Na Li | Dominika Cibulkova | 11 |
Serena Williams | Maria Sharapova | NA |
Angelique Kerber | Serena Williams | -2 |
Serena Williams | Venus Williams | -10 |
Mary Pierce | Conchita Martinez | 8 |
Jennifer Capriati | Kim Clijsters | NA |
Serena Williams | Venus Williams | -10 |
Justine Henin | Kim Clijsters | NA |
Anastasia Myskina | Elena Dementieva | -6 |
Justine Henin | Mary Pierce | -11 |
Justine Henin | Svetlana Kuznetsova | -7 |
Justine Henin | Ana Ivanovic | -16 |
Ana Ivanovic | Dinara Safina | 1 |
Svetlana Kuznetsova | Dinara Safina | -8 |
Francesca Schiavone | Samantha Stosur | -6 |
Na Li | Francesca Schiavone | 6 |
Maria Sharapova | Sara Errani | NA |
Serena Williams | Maria Sharapova | NA |
Maria Sharapova | Simona Halep | NA |
Serena Williams | Lucie Safarova | -2 |
Garbine Muguruza | Serena Williams | 7 |
Venus Williams | Lindsay Davenport | -4 |
Venus Williams | Justine Henin | 18 |
Serena Williams | Venus Williams | -10 |
Serena Williams | Venus Williams | -10 |
Maria Sharapova | Serena Williams | NA |
Venus Williams | Lindsay Davenport | -4 |
Amelie Mauresmo | Justine Henin | 8 |
Venus Williams | Marion Bartoli | 15 |
Venus Williams | Serena Williams | 10 |
Serena Williams | Venus Williams | -10 |
Serena Williams | Vera Zvonareva | 3 |
Petra Kvitova | Maria Sharapova | NA |
Serena Williams | Agnieszka Radwanska | 5 |
Marion Bartoli | Sabine Lisicki | -8 |
Petra Kvitova | Eugenie Bouchard | NA |
Serena Williams | Garbine Muguruza | -7 |
Serena Williams | Angelique Kerber | 2 |
Garbine Muguruza | Venus Williams | -3 |
Venus Williams | Lindsay Davenport | -4 |
Venus Williams | Serena Williams | 10 |
Serena Williams | Venus Williams | -10 |
Justine Henin | Kim Clijsters | NA |
Svetlana Kuznetsova | Elena Dementieva | -6 |
Kim Clijsters | Mary Pierce | NA |
Maria Sharapova | Justine Henin | NA |
Justine Henin | Svetlana Kuznetsova | -7 |
Serena Williams | Jelena Jankovic | -2 |
Kim Clijsters | Caroline Wozniacki | NA |
Kim Clijsters | Vera Zvonareva | NA |
Samantha Stosur | Serena Williams | -3 |
Serena Williams | Victoria Azarenka | -5 |
Serena Williams | Victoria Azarenka | -5 |
Serena Williams | Caroline Wozniacki | -2 |
Flavia Pennetta | Roberta Vinci | 9 |
Angelique Kerber | Karolina Pliskova | -11 |
Sloane Stephens | Madison Keys | -8 |