"Datasets, output files (BayesTrait) and analysis accompanying 'Evolution of sex allocation plasticity in a hermaphroditic flatworm genus'" 1) 'Sex allocation.csv' file contains data about the species, mating strategy (reciprocal copulation or hypodermic insemination), selfing (presence/absence). The mean (mean) and standard deviation (std) of sex allocation (SA) for Isolated, Pairs and Octets and the number of replicates(len) for each group for each species is provided, alongwith the study from which the data comes. 2) 'Sex allocation plasticity.csv' file contains data about the species, mating strategy (reciprocal copulation or hypodermic insemination), selfing (presence/absence). The effect size and its standard deviation (std dev) for sex allocation (SA) plasticity in response to mating partner or Sperm competition are given. 3) 'Macrostomum sp.22 sex allocation.csv' contains data on sex allocation, body size, total testes area, total ovaries area, seminal vesicle size, and area occupied by eggs data for the different group sizes (Isolated, Paired, Octet), and Enclosure sizes (Small, Large) for Macrostomum sp.22 . The ID refers to the replciate ID. 4) 'BayesTrait_output.zip' contains the output from the analysis examining the association between self-fertilization and the mating strategy, using BayesTraits V.3.0.1. Please see methods for more details. 5) 'Analysis_Sex_allocation_plasticity.R' contains the R code for the analysis mentioned in Methods section.