DOI: 10.5061/dryad.b8gtht7qg
title: Data and code from: Competitive cleaning: Behavioural variation supports coexistence of two juvenile sympatric cleanerfishes

description: 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.
description: # Competitive cleaning: Behavioural variation supports coexistence of two
 juvenile sympatric cleanerfishes. Dataset DOI:
 [10.5061/dryad.b8gtht7qg](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
 (&lt;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\\](https://cran.r-project.org\\) • RStudio
 (version ≥ 2023.06.1), available from [https://posit.co](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 1. Unzip the Dryad archive
 so you have: * competitive-cleaning-r.Rmd *
 input-data/cleaner-fish-data.xlsx * output-fig/ * (empty folder for plots)
 2. Open competitive-cleaning-r.Rmd in RStudio. 3. 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. 4. 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.