This folder contains data and R-code for:

Hampus Petrn, Gabriele Gloder, Diana Posledovich, Christer Wiklund, Magne Friberg
Innate preference hierarchies coupled with adult experience, rather than larval imprinting or transgenerational acclimation, determine host plant use in Pieris rapae
Ecology and Evolution

FILES

Petren_et_al_leaf_nitrogen.csv. Contains data on life nitrogen contents.
Variables:
LeafID - ID of leaf sample.
PlantSpecies - Plant species of leaf sample, Barbarea vulgaris or Berteroa incana.
Cohort - Cohort of leaf sample.
PropNitrogen - Proportion of nitrogen in leaf sample.


Petren_et_al_performance.csv. Contains data on larval performance.
Variables:
LarvalID - ID of larvae.
LarvalHost - Host plant species larvae fed on.
Sex - Sex of larvae (M = male, F = female).
MaternalHost - Host plant species the larvae's mother fed on.
MotherID - ID of the mother of the larvae.
DevelopmentTime - Development time of larvae (days), from hatching of egg to eclosion of adult.
AdultWeight - Weight (mg) of adult butterfly.
GrowthRate - Growth rate (log(mg)/day) of larvae.


Petren_et_al_preference.csv. Contains data on female oviposition preference and acceptance.
Variables:
Generation - Generation of female.
FemaleID - ID of female.
MaleID - ID of male that female mated with.
FemaleLarvHost - Host plant species female fed on as a larvae.
MaleLarvHost - Host plant species male fed on as a larvae.
MaternalLarvHost - Host plant species the female's mother fed on as a larvae.
NoChoiceHost - Host plant species used in the no-choice acceptance experiment.
EggsNoChoiceHost - Number of eggs oviposited on the no-choice host plant.
EggsPrefBerteroa - Number of eggs oviposited on Berteroa incana in the choice preference experiment.
EggsPrefBarbarea - Number of eggs oviposited on Barbarea vulgaris in the choice preference experiment.
EggsPrefBerteroaBinary - Indicates if eggs were oviposited on Berteroa incana during the choice preference experiment (1 = Yes, 0 = No).


Petren_et_al_analyses.R. R-script for all analyses in the paper.
