To do that in R, copy the command:
cor(a$longevity,a$gestation)
Now return to the scatterplot that you created earlier. Notice that there is an outlier in both longevity
(40 years) and gestation
(645 days). Note: This outlier corresponds to the longevity and gestation period of the elephant.