Exercise

Check dimension measurements

So far you have removed 2 cases with 0mm abalone heights which were measured incorrectly. You also removed 4 cases where shuckedWeight was larger than wholeWeight which is illogical probably due to recording errors. The abaloneKeep dataset loaded for this exercise now only has 4177 - 2 - 4 = 4171 cases.

Additionally, the relationship of the dimensional measurements also need to be reviewed. The length of the abalones (in mm) was defined to be the longest shell measurement. So, length should always be greater than height or diameter. Now, you will check this condition using a scatterplot with a Y=X reference line. You will then remove any cases that fail this length condition.

The abaloneKeep dataset, dplyr and ggplot2 packages are also loaded for you.

Instructions

100 XP
  • Make a scatterplot of length on x-axis and height on y-axis and add reference line Y=X with intercept 0 and slope 1.
  • Make a scatterplot of length on x-axis and diameter on y-axis and add reference line Y=X with intercept 0 and slope 1.
  • Update abaloneKeep to keep abalones with length greater than both height and diameter.