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.
Cet exercice fait partie du cours
R For SAS Users
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 andshuckedWeight
on y-axis, add reference line with intercept 0 and slope 1. - Make a scatterplot of
diameter
on x-axis andlength
on y-axis, add reference line with intercept 0 and slope 1.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de 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(___) +
___ +
___