DOI: 10.5061/dryad.kh18932mr
title: Data from: Habitat complexity alters the strength of sexual selection on female brain size in a livebearing fish

description: Animals often reproduce in complex environments, which should generate
 selection for both enhanced detectability in signaling traits and improved
 cognitive processing abilities. However, the extent to which signaling and
 cognitive traits have evolved to overcome the challenges of interacting in
 complex habitats remains understudied. We examined whether habitat
 complexity influences sexual selection in the pygmy halfbeak, Dermogenys
 collettei, a small livebearing freshwater fish. Using free-swimming
 arenas, we created low- and high-complexity environments and observed
 mating behaviors in mixed-sex groups. While the opportunity for sexual
 selection did not differ significantly between environments for either
 sex, we observed positive selection gradients for female brain size in
 open arenas, but not in complex habitats. Selection on morphological
 traits associated with visual signaling was also primarily detected in
 open environments, particularly in females. These results suggest that
 habitat complexity may reduce selection pressures on both cognitive
 traits, such as brain size, and signaling traits relevant to mate choice.
 Together, our findings highlight the importance of integrating cognitive
 traits into sexual selection theory and considering sex-specific selection
 across ecologically relevant contexts.
description: # Data from: Habitat complexity alters the strength of sexual selection on
 female brain size in a livebearing fish Dataset DOI:
 [10.5061/dryad.kh18932mr](https://doi.org/10.5061/dryad.kh18932mr) ##
 Description of the data and file structure R script, and data used to run
 the analysis and plots presented in: Daupagne, L., Devigili, A., McNeil,
 R., Wheatcroft, D., Kolm, N., & J. Habitat complexity alters the
 strength of sexual selection on female brain size in a livebearing fish.
 *Evolution*. ### Files and variables #### File:
 Habitat_complexity_script.R **Description:** The only file that you need
 to open. Loads datasets and formats data for running the analysis and
 plotting figures. All of the files must be within your working directory
 for the analysis to work. #### File: Matings.xlsx **Description:** file
 containing data on individual ID ##### Variables * day=day of the
 experiment. * arena=arena ID. * sex=M/F. * individual_ID_in_video=ID used
 when recording. * arena_type=no_barriers(open)/barriers(complex). *
 beak_L=beak length (from the tip of the lower jaw to the anterior part of
 the eye) (mm). * standard_L=body length (from the anterior part of the eye
 to the caudal peduncle) (mm). * Gravid_spot=gravid spot area (mm^2^) *
 brain_area= total dorsal brain area (mm^2^) * anal_R=area of red
 coloration on anal fin (mm^2^) * caudal_R=area of red coloration on caudal
 fin (mm^2^) * dorsal_R=area of red coloration on dorsal fin (mm^2^) *
 beak_R=area of red coloration on the beak (mm^2^) * total_R=total area of
 red coloration mm^2^) * anal_Y=area of yellow coloration on anal fin
 (mm^2^) * cadual_Y=area of yellow coloration on caudal fin (mm^2^) *
 dorsal_Y=area of yellow coloration on dorsal fin (mm^2^) * beak_Y=area of
 yellow coloration on the beak (mm^2^) * total_Y=total area of yellow
 coloration (mm^2^) * No_matings=total number of matings Cells filled with
 NA represent values that are not applicable (e.g., males do not have
 gravid spots) #### File: Pairwise.xlsx **Description:**  file containing
 data on pairwise interactions  ##### Variables * arena_ID * day=day of the
 experiment. * arena=arena ID. * person=person who recorded the behaviors.
 * arena_ID_in_video=arena ID when recording was done *
 arena_type=no_barriers(open)/barriers(complex). * female_arena_ID=female
 ID when recording * male_arena_ID=male ID when recording *
 number_matings=total number of matings Cells filled with NA represent
 values that are not applicable (the second observer did not provide an
 arena ID when recording was done) ## Code/software We provide the raw data
 files ("Matings.xlsx", "Pairwise.xlsx") and script
 file ("Habitat_complexity_script.R") to process the raw data,
 make plots, and run the statistics in R.