Challenge: Summary Statistics and Plotting in R

Use what you've learned so far to complete the following challenge.

Darwin’s maize pollination data

DarwinDarwin, C.R. (1876) The Effects of Cross and Self-Fertilisation in the Vegetable Kingdom. Echo Library (2007). describes how he produced seeds of maize that were fertilized with pollen from either the same individual or from a different plant. Pairs of seeds taken from self-pollinated and cross-pollinated plants were then grown in pots. The heights of the young seedlings were measured to represent their evolutionary fitness.

Problem statement

Write a piece of code in R that reads Darwin’s data frame from the SMPractical package and perform the following operations:

  • Display the first few rows of Darwin’s data frame.
  • Produce a table of the summary statistics (mean and standard deviation).
  • Create a boxplot of the data, where the x-axis shows the heights and the y-axis shows the pollination type.

Output

Get hands-on with 1200+ tech skills courses.