1. Introduction

Exploring Plant Growth Using R

  • Objective: Explore plant weight measurements across three groups.
  • Dataset: R’s built-in PlantGrowth dataset.
  • Tools: R, RStudio, Shiny and data visualization.

The application allows users to interactively explore the data and compare plant weight distributions.

2. Dataset Overview

The PlantGrowth dataset contains measurements for 30 plants divided into three groups.

data("PlantGrowth")
head(PlantGrowth)
##   weight group
## 1   4.17  ctrl
## 2   5.58  ctrl
## 3   5.18  ctrl
## 4   6.11  ctrl
## 5   4.50  ctrl
## 6   4.61  ctrl
  • weight: measured plant weight.
  • group: control (ctrl), treatment 1 (trt1), or treatment 2 (trt2).
  • Each group contains 10 observations.

3. Exploratory Data Analysis

We calculate the average weight for each group.

aggregate(weight ~ group, data = PlantGrowth, mean)
##   group weight
## 1  ctrl  5.032
## 2  trt1  4.661
## 3  trt2  5.526

The group averages provide a simple way to compare plant weights across the three conditions.

4. Visualizing Plant Weights

The following chart displays the distribution of plant weights in each group.

boxplot(
  weight ~ group,
  data = PlantGrowth,
  main = "Plant Weight by Group",
  xlab = "Group",
  ylab = "Plant Weight",
  col = c("lightblue", "lightgreen", "lightyellow")
)

Boxplots help compare medians, variability and potential outliers.

5. Conclusion

  • The dataset supports a basic comparison of plant weights across three groups.
  • Summary statistics and visualizations help identify differences in the observed measurements.
  • The Shiny app provides an interactive way to explore individual groups.

Live application: Plant Growth Explorer

The analysis is exploratory and does not, by itself, establish causation.