Data and code from: Competitive cleaning: Behavioural variation supports coexistence of two juvenile sympatric cleanerfishes
Data files
Jun 30, 2025 version files 68.98 KB
-
cleaner-fish-data.xlsx
27.21 KB
-
competitive-cleaning-r.Rmd
33.04 KB
-
README.md
8.73 KB
Abstract
Cleanerfish support coral reef ecosystems by providing important services to client fishes. Cleanerfish species often coexist, but how interspecies dynamics influence cleaning networks across life-history stages remains largely unknown. Here, we investigated the effects of interspecific competition on the behaviour of two juvenile cleaner wrasses, Labroides dimidiatus and Labroides bicolor. Under competitive scenarios, L. dimidiatus exhibited higher levels of client association compared to L. bicolor, while no differences were observed under non-competitive conditions. These behavioural differences likely facilitate resource partitioning and coexistence, supporting the stability of coexisting mutualistic networks in coral reef ecosystems.
Dataset DOI: 10.5061/dryad.b8gtht7qg
Description of the data and file structure
This dataset is the result of an aquarium-based experiment conducted in November 2019 at the Centre de Recherches Insulaires et Observatoire de l’Environnement (CRIOBE) in Moorea, French Polynesia (17°31’06.9”S, 149°50’59.4”W). Three species of juvenile wrasse (Labridae) were used in trials: bluestreak cleanerfish (Labroides dimidiatus), bicolor cleanerfish (Labroides bicolor), and the clown coris (Coris aygula), with the surgeonfish (Ctenochaetus striatus) used as a model client. This experiment consisted of three treatments where combinations of two interspecific individuals: 1) bluestreak (cleaner) and coris (non-cleaner), 2) bicolor (cleaner) and coris (non-cleaner), and 3) bluestreak (cleaner) and bicolor (cleaner), were exposed to a client (surgeonfish) and subsequent behaviour was assessed. Details of this experiment are outlined in the accompanying paper.
Files and variables
File: competitive-cleaning-r.Rmd
Description: All code required to complete the analysis in the associated paper.
File: cleaner-fish-data.xlsx
Description: Dataset required to complete the analysis in the associated paper. The dataset contains NA
entries in some columns to indicate that a value was not applicable. These values are not due to data entry errors and are appropriately handled during analysis in the accompanying R script.
Variable | Description |
---|---|
trial_id | Trial ID (n =10 per treatment) |
treatment | Species combination |
comp | Competitor to focal individual |
species | Focal individual |
interaction_n | Total number of interactions with client (<1.5 body lengths distance) |
interaction_s | Total time spent interacting with the client (seconds) |
interaction_mean_s | Mean duration of an interaction with the client (seconds) |
interaction_duration_stdev | Standard deviation of “interaction_mean_s” |
interaction_inter_event_intervals_mean_s | Mean duration of interval between interactions with client (seconds) |
interaction_inter_event_intervals_stdev | Standard deviation of “interaction_inter_event_intervals_mean_s” |
interaction_perc_total | Percent of total trial spent interacting with client |
front_n | Total number of distinct visits to front 3rd of tank |
front_s | Total time spent in the front 3rd of the tank (seconds) |
front_mean_s | Mean duration of a visit to front 3rd of tank (seconds) |
front_duration_stdev | Standard deviation of “front_mean_s” |
front_inter_event_intervals_mean_s | Mean duration of interval between visits to front 3rd of tank (seconds) |
front_inter_event_intervals_stdev | Standard deviation of “front_inter_event_intervals_mean_s” |
front_perc_total | Percent of total trial spent in front 3rd of tank |
middle_n | Total number of distinct visits to middle 3rd of tank |
middle_s | Total time spent in the middle 3rd of the tank (seconds) |
middle_mean_s | Mean duration of a visit to middle 3rd of tank (seconds) |
middle_duration_stdev | Standard deviation of “middle_mean_s” |
middle_inter_event_intervals_mean_s | Mean duration of interval between visits to middle 3rd of tank (seconds) |
middle_inter_event_intervals_stdev | Standard deviation of “middle_inter_event_intervals_mean_s” |
middle_perc_total | Percent of total trial spent in middle 3rd of tank |
back_n | Total number of distinct visits to back 3rd of tank |
back_s | Total time spent in the back 3rd of the tank (seconds) |
back_mean_s | Mean duration of a visit to the back 3rd of tank (seconds) |
back_duration_stdev | Standard deviation of “back_mean_s” |
back_inter_event_intervals_mean_s | Mean duration of interval between visits to back 3rd of tank (seconds) |
back_inter_event_intervals_stdev | Standard deviation of “back_inter_event_intervals_mean_s” |
back_perc_total | Percent of total trial spent in back 3rd of tank |
pipe_n | Total number of distinct visits to refuge/pipe |
pipe_s | Time spent in the refuge/pipe (seconds) |
pipe_mean_s | Mean duration of a visit to the refuge/pipe (seconds) |
pipe_duration_stdev | Standard deviation of “pipe_mean_s” |
pipe_inter_event_intervals_mean_s | Mean duration of interval between visits to refuge/pipe (seconds) |
pipe_inter_event_intervals_stdev | Standard deviation of “pipe_inter_event_intervals_mean_s” |
pipe_perc_total | Percent of total trial spent in refuge/pipe |
chase_n | Total number of chases directed at the competitor |
bite_n | Total number of bites directed at the competitor |
Code/software
Software requirements:
• R (version ≥ 4.4.2), available from https://cran.r-project.org\
• RStudio (version ≥ 2023.06.1), available from https://posit.co
R packages (installed and loaded via pacman::p_load):
ggplot2, ggthemes, ggfortify, ggridges, gghalves, ggExtra, plotly, colorspace, ggrepel, ggdist, gt, tinytex, data.table, stringr, tidyverse, janitor, readxl, broom, lme4, glmmTMB, car, emmeans, bbmle, magrittr, lmerTest, rptR, RNOmni, AICcmodavg, see, performance
Workflow
- Unzip the Dryad archive so you have:
- competitive-cleaning-r.Rmd
- input-data/cleaner-fish-data.xlsx
- output-fig/
- (empty folder for plots)
- Open competitive-cleaning-r.Rmd in RStudio.
- Click “Knit” or run rmarkdown::render(“competitive-cleaning-r.Rmd”) in the Console.
- The YAML setting knit_root_dir: “.” ensures all paths resolve relative to the .Rmd file.
- The setup chunk uses pacman to install any missing packages and then loads them.
- The script reads the Excel data, performs data-tidying, statistical modelling, diagnostics and plotting, and writes output figures into output-fig.
Included script
competitive-cleaning-r.Rmd contains all steps for data import, cleaning, analysis, model diagnostics and figure generation for Brooker et al. (2025). No additional code files are required.
Credits
This submission includes the dataset and code required to replicate the analysis in the accompanying publication. Raw data was collected by Rohan Brooker, Zara-Louise Cowan and William Feeney. Data was processed and analysed by Jake Martin and Sylvie Evans. The R-Markdown document included in this submission was prepared by Jake Martin.