DOI: 10.5061/dryad.pvmcvdnvt
title: Community trait variation drives selection on species diversity through feedback with predator density

description: Identifying the processes underlying community assembly and dynamics
 remains a central goal in ecology. Although much research has been devoted
 to analyzing how environments affect species diversity, fewer
 studies have resolved the link between the fundamental process
 of ecological selection and species diversity. It has been
 suggested that identifying ecological selection by estimating
 changes in community-weighted variance (CWV) and mean (CWM) of
 functional traits may help to identify more general rules of community
 assembly. Here, we asked whether and how selection by predation
 and competition affect species diversity, and how this is
 determined by the initial CWV and CWM for traits governing species
 interactions, as in our case: competitiveness and defense against
 a predator. We tracked experimental 5-species phytoplankton communities in
 the presence and absence of a rotifer predator over time. We
 manipulated the initial community composition so that communities shared
 at least 3 of the 5 species, but differed in CWV and CWM for
 defense against predation. We found that species diversity was
 highest with higher initial trait distributions and that temporal changes
 in diversity correlated with trait selection. The initial
 distributions determined the form of selection over time, with
 directional selection for defense and competitiveness followed
 by reduced selection and an increase in niche availability when
 the initial trait distribution was low or high. For intermediate
 initial trait distributions, we observed directional selection
 in only one trait followed by stabilizing selection. Differences
 and changes in selection for defense, competitiveness and species
 diversity, correlated with the changes in predator density over
 time. This suggests that the initial trait distribution determined species
 diversity through a feedback loop with changes in selection on
 traits and predator density. Overall, our study shows that
 identifying ecological selection on functional traits can provide a
 mechanistic understanding of community assembly.
description: # Community trait variation drives selection on species diversity
 [https://doi.org/10.5061/dryad.pvmcvdnvt](https://doi.org/10.5061/dryad.pvmcvdnvt) ## Description of the data and file structure This dataset contains the data required to replicate analyses in Vu & Becks (2024), testing the hypothesis that changes in species diversity over time is affected by selection imposed by predation and that this depended on initial trait distribution. The data covers maximum growth rate and clearance rate measurements for 13 phytoplankton species, as well as the population dynamics for 6 phytoplankton communities.  ### Files and variables #### File: ingestion\_rate.txt **Description:** We measured the ingestion rate of the rotifer *Brachionus calyciflorus* as a mean for defense against predation for 13 phytoplankton species with 5 replicates for each species and transformed the ingestion rate into clearance rate to obtain the volume in µL that was cleared by a single rotifer.  ##### Variables * species: Phytoplankton species names grazed by the rotifer. * ClearRate: Volume in µL that was cleared by an individual rotifer. #### File: max\_growth\_rate.txt **Description:** We measured the maximum growth rate for 13 phytoplankton species with 3 replicates for each species. ##### Variables * species: Phytoplankton species names. * maxGR: Maximum growth rate for each phytoplankton species. #### File: data\_all\_final.txt **Description:** This data set contains all data required for the analysis of Vu & Becks (2024). For equal weights of the traits, data on maximum growth rate and ingestion rate were normalized using (x - min(x)) / (max(x) - min(x)).  ##### Variables * community: Experimental community * day: Experimental days in numerics * replicate: Experimental replicates * species: Phytoplankton species  * p_cells_mL: Specific phytoplankton species density as cells per mL  * p_total_rep: Total phytoplankton density per replicate as cells per mL * rt_reps_ind_mL: Rotifer density per replicate as individuals per mL * rt_mean_ind_mL: Mean rotifer density across replicates as individuals per mL * rt_log_reps: Logarithm of rotifer density per replicate  * rt_log_mean: Logarithm of mean rotifer density across replicates * rt_gr: Rotifer growth rate  * rt_mean_gr: Mean of rotifer growth rate * g_mean_sp: Mean maximum growth rate across 3 replicates  * i_mean_sp: Mean clearance rate across 5 replicates * g_CWM: Community weighted mean for the communities maximum growth rate per replicate * i_CWM: Community weighted mean for the communities clearance rate per replicate * g_CWV: Community weighted variance for the communities maximum growth rate per replicate * i_CWV: Community weighted variance for the communities clearance rate per replicate * H_max: Maximum Shannon diversity * H: Shannon diversity index * E: Shannon equitability index * H_mean: Mean of Shannon diversity index * E_mean: Mean of Shannon equitability index * area_d0: Initial trait space area * area_d20: Final trait space area * day_chr: Experimental days in characters #### File: data\_rep\_final.txt **Description:** This data set contains the data summarised per replicate required for the analysis of Vu & Becks (2024) ##### Variables * community: Experimental community * day: Experimental day * replicate: Experimental replicates * p_mean_mL: Mean phytoplankton density per replicate as cells per mL * p_total_rep: Total phytoplankton density per replicate as cells per mL * rt_mean_mL: Mean rotifer density across replicates as individuals per mL * rt_gr: Rotifer growth rate * rt_mean_gr: Mean rotifer growth rate * g_CWM: Community weighted mean for the communities maximum growth rate per replicate * i_CWM: Community weighted mean for the communities clearance rate per replicate * g_CWV: Community weighted variance for the communities maximum growth rate per replicate * i_CWV: Community weighted variance for the communities clearance rate per replicate * H_max: Maximum Shannon diversity index * H: Shannon diversity index * E: Shannon equitability index * area_d0: Initial trait space area * area_d20: Final trait space area * g_CWM_com: Community weighted mean for the communities maximum growth rate across replicates * i_CWM_com: Community weighted mean for the communities clearance rate across replicates * g_CWV_com: Community weighted variance for the communities maximum growth rate across replicates * i_CWV_com: Community weighted variance for the communities clearance rate across replicates ## Code/software All statistical analyses were performed using the software Rstudio (R version 4.2.2., R Core Team, 2022).  The following list of packages are required prior to the analysis:  * library(tidyverse) * library(rstatix) * library(ggplot2) * library(ggpubr) * library(FSA) * library(lme4) * library(effects) * library(emmeans)