4.6) Exploring Data
There are often many ways of achieving the same objective in R!
Use the data frame GRASS
that you created from the file "r_data" (Appendix; Section 2).
- Check the histogram of
GRASS$Dms
. Did you notice a severe outlier? Assume it’s a typing error and correct it. - Find a transformation of
GRASS$Dms
that makes it approximately linear with respect toGRASS$Blade
(hint: useplot(Dms ~ Blade, data=GRASS)
). - Obtain an edited version of
GRASS
that contains only the records for plants older than 20 days, storing it with an appropriate name. - Obtain the dry masses of these plants in ascending order.
- Investigate the data frame
swiss
(after typingdata(swiss)
if necessary; you can also use justdata()
with empty brackets to see what else is there.) How many of the Swiss cantons (rows) were more than 80% Catholic but less than 50% agricultural? (These data come from 1888!)