2/11/2019

Height & Weight Scatter Plot

  • Scatter Plot to show relationship between Age and Height
  • Group by sex in different colour

Required R Packages Setup

require(gcookbook)
require(data.table)
require(plotly)
hw = data.table(heightweight)
head(hw[, c("sex", "ageYear", "heightIn")], 10)
##     sex ageYear heightIn
##  1:   f   11.92     56.3
##  2:   f   12.92     62.3
##  3:   f   12.75     63.3
##  4:   f   13.42     59.0
##  5:   f   15.92     62.5
##  6:   f   14.25     62.5
##  7:   f   15.42     59.0
##  8:   f   11.83     56.5
##  9:   f   13.33     62.0
## 10:   f   11.67     53.8

Scatter Plot Group by Sex

Thank you