Introduction

Some trees, called masting species, produce seeds in big, synchronized bursts: nearly every tree sets a heavy crop in one year, then almost none do for a year or two. Sugar maples are masting trees. Red maples are not. Researchers at the Harvard Forest in Petersham, Massachusetts, have tracked sugar maples since 2011 and added red maples in 2015 to test one idea: does the non-masting red maple have muted dynamics compared to the masting sugar maple? This report tries to answer that question.

The data include sap sugar and sap weight (measured each late winter), flowering ratings, and seed counts. With that being said, it’s importnat to note that red maples appear only in the sap tables, and only for 2015 to 2018, so the species comparison has to rely on sap, using those four shared years. Sap sugar is probably a reasonable stand-in because the researchers use it as a sign of a tree’s stored energy. The sugar maple seed and flowering records are used to confirm that masting really happens at this site. Here, “muted” means less year-to-year variability, and less synchronicity among trees.

The data

The data that will be used in this report will come from this source, as the researchers request: Rapp J, Crone E, Stinson K. 2025. Maple Reproduction and Sap Flow at Harvard Forest since 2011. Harvard Forest Data Archive: HF285 (v.7). Environmental Data Initiative.

https://doi.org/10.6073/pasta/2ad66d124f043c7326ca2b607447c518.

Setup

Before doing any analysis, these are the packages that we’ll need.

library(tidyverse)
library(broom)
library(readr) 
library(lubridate)

Now here are the data sets I will be using for this report.

hf285_01_maple_tap <- read_csv("~/Downloads/hf285-01-maple-tap.csv")
hf285_02_maple_sap <- read_csv("~/Downloads/hf285-02-maple-sap.csv")
hf285_03_maple_flower_qual <- read_csv("~/Downloads/hf285-03-maple-flower-qual.csv")
hf285_09_maple_seed_count <- read_csv("~/Downloads/hf285-09-maple-seed-count.csv")
tap <- hf285_01_maple_tap
sap <- hf285_02_maple_sap
flower <- hf285_03_maple_flower_qual
seeds <- hf285_09_maple_seed_count

Since only the sap and the tap tables record species, I’ll include a lookup property from the tap table and then relabel them so it’s easier to follow. Also, the count that follows will show how many trees of each species were observed, that being the 20 sugar maples and 10 red maples.

species_lookup <- tap |>
  distinct(tree, species) |>
  mutate(species = recode(species, ACSA = "Sugar maple", ACRU = "Red maple"))

count(species_lookup, species)
## # A tibble: 2 × 2
##   species         n
##   <chr>       <int>
## 1 Red maple      10
## 2 Sugar maple    20
species_cols <- c("Sugar maple" = "#D95F02", "Red maple" = "#1B7837")

Next I broke down the dates and created a year column and attach readable species names. The summary table then shows the number of records, the maximum sugar reading, and the missing values for each species. A maple sap reading above 10 Brix is implausible, so I count those readings and set them aside, rather than dropping them silently. This “cleaned” version will eliminate any rows with anything above 10 Brix.

sap <- sap |>
  mutate(date = ymd(date), year = year(date),
         species = recode(species, ACSA = "Sugar maple", ACRU = "Red maple"))

sap |> group_by(species) |>
  summarise(n = n(), max_sugar = max(sugar, na.rm = TRUE),
            missing_sugar = sum(is.na(sugar)),
            missing_sap.wt = sum(is.na(sap.wt)))
## # A tibble: 2 × 5
##   species         n max_sugar missing_sugar missing_sap.wt
##   <chr>       <int>     <dbl>         <int>          <int>
## 1 Red maple    1056       3.5           270             76
## 2 Sugar maple  7966      22             739            555
n_outliers <- sum(sap$sugar > 10, na.rm = TRUE)
cat("Collections with implausible sugar (> 10 Brix):", n_outliers, "\n")
## Collections with implausible sugar (> 10 Brix): 1
sap_clean <- sap |> filter(is.na(sugar) | sugar <= 10)

The two species were not sampled in the same years, so a fair comparison needs years where both were measured. This chunk lists which species appear in each year and then saves the years that have both. Red maples only appear from 2015 to 2018, so those four years become the comparison window.

sap_clean |> distinct(species, year) |> count(year) |>
  mutate(both_species = n == 2) |> arrange(year)
## # A tibble: 11 × 3
##     year     n both_species
##    <dbl> <int> <lgl>       
##  1  2012     1 FALSE       
##  2  2013     1 FALSE       
##  3  2014     1 FALSE       
##  4  2015     2 TRUE        
##  5  2016     2 TRUE        
##  6  2017     2 TRUE        
##  7  2018     2 TRUE        
##  8  2019     1 FALSE       
##  9  2020     1 FALSE       
## 10  2021     1 FALSE       
## 11  2022     1 FALSE
overlap_years <- sap_clean |> distinct(species, year) |> count(year) |>
  filter(n == 2) |> pull(year)
overlap_years
## [1] 2015 2016 2017 2018

Furthermore, there are some trees that were tapped in two places and sampled on different numbers of days. To keep heavily sampled trees from counting more, I average each tree’s readings within each year. This gives one sugar value and one sap-weight value per tree per year, and I then keep only the overlapping years for the species comparison.

tree_year <- sap_clean |>
  group_by(species, tree, year) |>
  summarise(sugar = mean(sugar, na.rm = TRUE),
            sap.wt = mean(sap.wt, na.rm = TRUE),
            collections = n_distinct(date), .groups = "drop") |>
  mutate(across(c(sugar, sap.wt), ~ ifelse(is.nan(.x), NA, .x)))

ty_overlap <- filter(tree_year, year %in% overlap_years)

Before comparing species, I need to confirm that sugar maples really do mast. The seed table has no year or species column, so this chunk pulls the year out of the count date and joins species from the lookup. The count of species is a useful check since it will show which species actually have seed data in this version of the dataset. You will see that only sugar maples do.

seeds <- seeds |>
  select(-any_of("species")) |>
  mutate(year = year(ymd(date))) |>
  left_join(species_lookup, by = "tree")

seeds |> count(species)
## # A tibble: 1 × 2
##   species         n
##   <chr>       <int>
## 1 Sugar maple   220
seed_year <- seeds |>
  group_by(year) |>
  summarise(mean_count = mean(total.count, na.rm = TRUE),
            share_trees_zero = mean(total.count == 0, na.rm = TRUE),
            .groups = "drop")
seed_year
## # A tibble: 11 × 3
##     year mean_count share_trees_zero
##    <dbl>      <dbl>            <dbl>
##  1  2011      43.2              0   
##  2  2012       0.05             0.95
##  3  2013      31.2              0.25
##  4  2014      10.6              0.6 
##  5  2015       4                0.7 
##  6  2016       3.05             0.7 
##  7  2017      43.8              0.15
##  8  2018       0                1   
##  9  2019      30.0              0.35
## 10  2020       3.2              0.75
## 11  2021      15.2              0.45

Sugar Maple Seed Production

A table of yearly means hides how individual trees behave, so this plot shows each tree’s seed count as a dot over a boxplot for each year. If sugar maples mast, you should see heavy years followed by years where every tree is near zero.

seeds |>
  ggplot(aes(factor(year), total.count)) +
  geom_boxplot(fill = "#D95F02", alpha = 0.5, outlier.shape = NA) +
  geom_jitter(width = 0.15, alpha = 0.5) +
  labs(title = "Sugar maple seed production, 2011–2021",
       subtitle = "Samara-pair counts per tree (two observers combined)",
       x = NULL, y = "Samara pairs counted")

Flowering Intensity

Seed crops begin with flowers, so this stacked bar chart shows how many sugar maples fell into each flowering category (none, low, medium, high) each year. Mast years should appear as bars that are mostly “high,” and failure years as bars that are mostly “none.”

flower |>
  mutate(flowering.intensity = factor(flowering.intensity,
                                      levels = c("none", "low", "medium", "high"))) |>
  count(year, flowering.intensity, .drop = FALSE) |>
  ggplot(aes(factor(year), n, fill = flowering.intensity)) +
  geom_col(position = position_dodge(width = 0.9)) +
  scale_fill_brewer(palette = "YlGn") +
  labs(title = "Whole-tree flowering of sugar maples",
       x = NULL, y = "Number of trees", fill = "Flowering")

Analysis

The red maple comparison relies on sap sugar, so it is going to be helpful to know whether sap sugar responds to reproduction at all. The idea is that if a heavy seed crop uses up a tree’s stored energy, its sap should be less sweet the following spring. To check this, I calculate the average sap sugar of sugar maples in each year and the average seed count from the year before. I shift the seed years forward by one so that each row lines up a spring’s sap with the previous summer’s seed crop. The table shows the two numbers side by side.

seed_prev <- seeds |>
  group_by(year) |>
  summarise(prev_seeds = mean(total.count, na.rm = TRUE)) |>
  mutate(year = year + 1)

sugar_year <- tree_year |>
  filter(species == "Sugar maple") |>
  group_by(year) |>
  summarise(mean_sugar = mean(sugar, na.rm = TRUE))

sugar_vs_seeds <- inner_join(sugar_year, seed_prev, by = "year")
sugar_vs_seeds
## # A tibble: 11 × 3
##     year mean_sugar prev_seeds
##    <dbl>      <dbl>      <dbl>
##  1  2012       2.16      43.2 
##  2  2013       2.57       0.05
##  3  2014       2.70      31.2 
##  4  2015       2.90      10.6 
##  5  2016       2.40       4   
##  6  2017       2.51       3.05
##  7  2018       2.52      43.8 
##  8  2019       2.67       0   
##  9  2020       2.39      30.0 
## 10  2021       2.43       3.2 
## 11  2022       2.29      15.2

Sap Sugar vs. Last Year’s Seeds

This scatterplot shows the same table as a picture. Each point is one year, labeled by the year of the sap collection, with the previous year’s average seed count on the horizontal axis. If heavy seed years were followed by less sweet sap, the points would slope downward from left to right.

ggplot(sugar_vs_seeds, aes(prev_seeds, mean_sugar, label = year)) +
  geom_point(color = "#D95F02", size = 2) +
  geom_text(vjust = -0.8, size = 3) +
  geom_smooth(method = "lm", se = FALSE, color = "black") +
  labs(title = "Sugar maple sap sugar versus the previous year's seed crop",
       x = "Average samara-pair count, previous year",
       y = "Average sap sugar (Brix)")

The plot shows only a weak link between a heavy seed crop and sweeter or less sweet sap the following spring. The fitted line slopes slightly downward, which matches the idea that heavy seed years use up a tree’s stored energy: the lowest sap sugar of all (2012) came right after a heavy seed year (2011), and sap was generally sweeter after years with almost no seeds, such as 2013 and 2019. With that being said, the points are quite scattered around the line. Sap after two other heavy seed years (2014 and 2018) was still fairly sweet, and the sweetest sap of all (2015) followed a year with only a moderate crop. Since there is only 11 years of data, one or two points can change the slope, so this pattern is not a firm fit. This means sap sugar responds only loosely to the mast cycle, and it is a rough, indirect stand-in for a tree’s reproductive state. This is one reason the later comparison of red and sugar maples on sap sugar should be interpreted with caution.

Sap Sugar Over Time

Now for the main comparison. Each thin line is one tree’s average sap sugar across the four shared years, and the thick line is the species average. If red maples were muted, their lines should look flatter than the sugar maple lines.

ty_overlap |>
  ggplot(aes(year, sugar, group = tree, color = species)) +
  geom_line(alpha = 0.3) +
  stat_summary(aes(group = species), fun = mean, geom = "line", linewidth = 1.5) +
  scale_color_manual(values = species_cols) +
  facet_wrap(~ species) +
  labs(title = "Mean sap sugar per tree",
       subtitle = "Thin lines: individual trees. Thick line: species mean.",
       x = NULL, y = "Sap sugar (Brix)") +
  theme(legend.position = "none")

Both species follow a similar pattern over the four shared years: sap sugar falls from 2015 to 2016 and then stays low and recovers slightly near the end. Red maples sit at a lower level (roughly 1.7 to 2.1 Brix, compared with about 2.4 to 2.9 for sugar maples), but the size of the 2015 to 2016 drop looks similar in the two species, so red maples do not appear flatter in how much their sap sugar changes. Red maple trees also move closely together, with their lines running mostly parallel, while sugar maple trees are more spread out and their lines cross more often. This suggests that red maples are, if anything, more synchronized. The comparison covers only four years, so this is a visual impression that the variability measures in the next sections need to confirm.

Sap Weight Over Time

Sugar concentration is only one side of the story. Sap weight per collection reflects how much sap actually flowed, so I’ll use the same layout for it. This checks whether any difference in dynamics shows up in sap flow as well.

ty_overlap |>
  ggplot(aes(year, sap.wt, group = tree, color = species)) +
  geom_line(alpha = 0.3) +
  stat_summary(aes(group = species), fun = mean, geom = "line", linewidth = 1.5) +
  scale_color_manual(values = species_cols) +
  facet_wrap(~ species) +
  labs(title = "Mean sap weight per collection",
       x = NULL, y = "Sap weight (kg)") +
  theme(legend.position = "none")

Sap weight tells a similar story. Both species dip in 2016 and then climb through 2018. Plus, red maples yield less sap per collection overall (about 1.5 to 2.5 kg, compared with about 3.8 to 5.2 kg for sugar maples). The shape of the change is much the same in both species, so red maples do not look more muted in sap flow either.

Variability within Each Tree

Red maples have a lower average sugar level, but “muted dynamics” is about change over time, not level. So, to separate the two, I divided the standard deviation divided by mean across the four years. Dividing by the mean makes the measure more fair across species with different averages.

tree_cv <- ty_overlap |>
  group_by(species, tree) |>
  filter(sum(!is.na(sugar)) >= 3) |>
  summarise(n_years = n(),
            mean_sugar = mean(sugar, na.rm = TRUE),
            cv_sugar = sd(sugar, na.rm = TRUE) / mean_sugar,
            mean_sap = mean(sap.wt, na.rm = TRUE),
            cv_sap = sd(sap.wt, na.rm = TRUE) / mean_sap,
            .groups = "drop")

tree_cv |> group_by(species) |>
  summarise(trees = n(),
            median_cv_sugar = median(cv_sugar), mean_cv_sugar = mean(cv_sugar),
            median_cv_sap = median(cv_sap), mean_cv_sap = mean(cv_sap))
## # A tibble: 2 × 6
##   species     trees median_cv_sugar mean_cv_sugar median_cv_sap mean_cv_sap
##   <chr>       <int>           <dbl>         <dbl>         <dbl>       <dbl>
## 1 Red maple      10           0.117         0.119         0.282       0.305
## 2 Sugar maple    19           0.112         0.119         0.204       0.204

Comparing Variability

Here the tree-level CVs are plotted side by side for the two species, one panel for sugar and one for sap weight. Each dot is one tree. If red maples were muted, their boxes would sit clearly lower than the sugar maples’ boxes.

tree_cv |>
  pivot_longer(c(cv_sugar, cv_sap), names_to = "measure", values_to = "cv") |>
  mutate(measure = recode(measure, cv_sugar = "Sap sugar", cv_sap = "Sap weight")) |>
  ggplot(aes(species, cv, fill = species)) +
  geom_boxplot(alpha = 0.6, outlier.shape = NA) +
  geom_jitter(width = 0.1) +
  scale_fill_manual(values = species_cols) +
  facet_wrap(~ measure, scales = "free_y") +
  labs(title = "Year-to-year variability within trees", x = NULL,
       y = "Coefficient of variation") +
  theme(legend.position = "none")

These plots clearly show that red maples do not sit lower than sugar maples, indicating that the red maples are probably not muted. ## Testing the Difference in Variability

The plot suggests an answer, and this chunk puts a number on it. A two-sample t-test will compare the average coefficient of variation of the red maples with the average of the sugar maples. The null hypothesis is that the two species have the same average variability. A small p-value (below 0.05) would mean the difference is unlikely to be due to chance. I run the test for sap sugar and for sap weight and stack the results into one table, showing the mean of each species next to the p-value.

sugar_test <- t.test(cv_sugar ~ species, data = tree_cv)
sap_test   <- t.test(cv_sap ~ species, data = tree_cv)

tibble(measure = c("Sap sugar", "Sap weight"),
       red_maple_mean = c(sugar_test$estimate[1], sap_test$estimate[1]),
       sugar_maple_mean = c(sugar_test$estimate[2], sap_test$estimate[2]),
       t_statistic = c(sugar_test$statistic, sap_test$statistic),
       p_value = c(sugar_test$p.value, sap_test$p.value))
## # A tibble: 2 × 5
##   measure    red_maple_mean sugar_maple_mean t_statistic p_value
##   <chr>               <dbl>            <dbl>       <dbl>   <dbl>
## 1 Sap sugar           0.119            0.119     0.00848  0.993 
## 2 Sap weight          0.305            0.204     1.88     0.0828

Neither test found a significant difference in variability between the species (p > 0.05), so there is no evidence that red maples are more muted than sugar maples.

Furthemore, masting is defined by trees rising and falling together, not only by large swings. To measure that, I first define a small function that takes one species’ data, reshapes it so each column is a tree, and returns the correlation for every pair of trees. I then apply it to each species with group_modify() and summarize the results.

pairwise_cor <- function(df) {
  wide <- df |> select(tree, year, sugar) |>
    pivot_wider(names_from = tree, values_from = sugar)
  m <- cor(select(wide, -year), use = "pairwise.complete.obs")
  tibble(r = m[upper.tri(m)])
}

sync <- ty_overlap |>
  group_by(species) |>
  group_modify(~ pairwise_cor(.x)) |>
  ungroup()

sync |> group_by(species) |>
  summarise(pairs = n(), mean_r = mean(r, na.rm = TRUE),
            median_r = median(r, na.rm = TRUE))
## # A tibble: 2 × 4
##   species     pairs mean_r median_r
##   <chr>       <int>  <dbl>    <dbl>
## 1 Red maple      45  0.606    0.754
## 2 Sugar maple   171  0.434    0.702

Does the yearly pattern differ by species

Throughout this report, each measure compared the species with one number per tree. This section looks at the yearly pattern directly. For every tree I calculate the percent change in sap sugar from one year to the next (2015 to 2016, 2016 to 2017, and 2017 to 2018). The table shows the average percent change for each species. If red maples were muted, their changes would be smaller than the sugar maples’ changes in each year.

pct_change <- ty_overlap |>
  select(species, tree, year, sugar) |>
  pivot_wider(names_from = year, values_from = sugar, names_prefix = "y") |>
  mutate(change_2016 = (y2016 - y2015) / y2015 * 100,
         change_2017 = (y2017 - y2016) / y2016 * 100,
         change_2018 = (y2018 - y2017) / y2017 * 100)

pct_change |>
  group_by(species) |>
  summarise(across(starts_with("change"), ~ mean(.x, na.rm = TRUE)))
## # A tibble: 2 × 4
##   species     change_2016 change_2017 change_2018
##   <chr>             <dbl>       <dbl>       <dbl>
## 1 Red maple         -19.5        2.97       11.4 
## 2 Sugar maple       -15.6        4.45        1.71

Conclusion

The evidence in this dataset does not show that red maples have muted dynamics compared to sugar maples. Sugar maples clearly mast: seed counts and flowering swing from heavy years (such as 2011, 2013, 2017 and 2019) to near-total failure on every tree (2012 and 2018). Over the four years when both species were measured (2015 to 2018), red maples had lower sap sugar on average, but their year-to-year variability, scaled by each tree’s own average, was about the same as that of sugar maples, and their trees rose and fell together at least as closely as sugar maples did. However, this result should be treated as weak evidence in either direction because sap sugar is only an indirect stand-in for reproduction. Also, we have to keep in mind that the shared period is just four years, only 10 red maples were monitored, and the sample covers a single site. The decisive test would use red maple seed and flowering counts, which this revision of the data does not include, so the next step is to add those records and extend the red maple sap series beyond 2018.