Get startedGet started for free

Check final dataset

At this point you have added six new variables to the original abalone dataset increasing the number of columns from 9 to 15. You have also filtered out (2+4+2) = 8 cases with various measurement or data recording errors, leaving 4169 cases.

In this exercise you will verify these numbers by running dim() to check the dimensions of the final abaloneKeep dataset. You will also run some checks on this final dataset reviewing the summary statistics on all of the variables and making a few more scatterplots to double check the assumptions about weights and dimensions.

The abaloneKeep dataset, dplyr and ggplot2 packages have been loaded for you.

This exercise is part of the course

R For SAS Users

View Course

Exercise instructions

  • Get the dimensions of the final abaloneKeep dataset.
  • Get the summary statistics of all variables in abaloneKeep.
  • Make a scatterplot of wholeWeight on x-axis and shuckedWeight on y-axis, add reference line with intercept 0 and slope 1.
  • Make a scatterplot of diameter on x-axis and length on y-axis, add reference line with intercept 0 and slope 1.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Dimensions of final dataset with samples in abaloneKeep
___

# Get summary statistics of all variables in abaloneKeep
___

# Scatterplot of shuckedWeight by wholeWeight add y=x line
ggplot(___) +
  ___ +
  ___

# Scatterplot of length by diameter add y=x line
ggplot(___) +
  ___ +
  ___
Edit and Run Code