DOI: 10.5061/dryad.1c59zw42c
title: Data from: Long-term anti-predator learning and memory N. canaliculata

description: Anti-predator behaviours in response to predator cues can be innate, or
 they can be learned through prior experience and remembered over time. The
 duration and strength of continued anti-predator behaviour after predator
 cues are no longer present and the potential for an enhanced response when
 re-exposed to predator cues later are less known but could account for
 observed variation in anti-predator responses. We measured the carryover
 effects of past predation exposure and the potential for anti-predator
 learning and memory in the marine snail Nucella canaliculata from six
 populations distributed over 1,000km of coastline. We exposed lab-reared
 snails to cues associated with a common crab predator or seawater control
 in two serial experiments separated by over 7 months. Responses were
 population and sex dependent with some populations retaining anti-predator
 behaviours while others showed a capacity for learning and memory. Male
 snails showed a strong carryover of risk-aversion while females were able
 to return to normal feeding rates and grow more quickly. These behavioural
 differences culminated in strong impacts on feeding and growth rates
 demonstrating that this variation has implications for the strength of
 trait-mediated indirect interactions, which can impact entire ecosystems.
description: We ran a fully crossed, factorial experiment that exposed
 <em>Nucella canaliculata</em> snails to either control or
 predator cue treatments (rock crabs<em> </em>with crushed
 conspecific snail cues) in an initial experiment (Trial 1) followed seven
 months later by another experimental exposure (Trial 2) to either a
 seawater control or predator cues (rock crabs, no crushed conspecific).
 During both of these exposures, we tracked each individual snail’s
 behaviour in containers that provided areas of refuge and risk. This
 design allowed us to assess 1) how prior exposure to predator cues
 influenced the behaviour of snails months later (fear retention), 2) how
 prior experience influenced the behaviour of snails in a subsequent
 exposure to predator cues (fear memory), and 3) how these capabilities
 varied depending on source population or sex. We also collected size data
 (length, weight, and weight-to-length ratio) to determine if size impacted
 behavioural patterns.
description: # Long-term anti-predator learning and memory N. canaliculata
 [https://doi.org/10.5061/dryad.1c59zw42c](https://doi.org/10.5061/dryad.1c59zw42c) Data include behavioral observations of snails during Trial 1 and Trial 2 of our laboratory experiments. Snails were exposed to either control conditions or to crab cues (crab + crushed conspecific in Trial 1, just crab cues in Trial 2). We also have data for size measurements of snails (length, wet mass (weight) and the weight-to-length ratio). ## Description of the data and file structure Data derived from experimental measurements during multiple stages of the experiment (Trial 1 and Trial 2). Data include: * Trial 1 behavior - Trial 2 behavior - Size data taken prior to Trial 1, after Trial 1 (12 weeks in treatment), and prior to Trial 2 (after an additional 8 weeks in treatment and then 29 weeks in ambient conditions) ### Description of the data and file structure **Experimental Analyses** The code used to conduct the statistical analyses and create the graphs described and reported in the manuscript including those involving behavior in Trial 1, behavior in Trial 2, and size data across the experiment. **Code:** 1\) Fear_Memory_Analysis_7.5.24.Rmd - R Notebook with statistical analyses for the experiments 2\) Fear_Memory_Analysis_GRAPHS_7.5.24.Rmd - R Notebook for just making graphs/data visualizations **Files:**  1\) **Trial1_Same Snails_1.22.24.csv** 1. Number of variables: 9 2. Number of cases/rows: 5,329 1. Variable list: Date - The date on which the behavioral observation was made (each snail has 12 observations on 12 dates). Block- Denotes which elevated container the experimental container was placed under (see Fig. S1 on manuscript). There were 12 blocks total in Trial 1 with six seawater control containers and six housing crabs. Container - The experimental container housing the snail (see Fig. S1 in manuscript) Each container housed one male and one female snail in Trial 1 and  each container was given a unique number for a total of 288. Family - Denotes snails originating from the same cluster of egg capsules when collected in the field  (noted as the population of origin and a number, e.g., "AR-11"). Sex - The sex of the snail, Male or Female. Tag - The individual identifying tag number demarcating each individual snail throughout the experiment. Each snail received a tag with a unique color + number combination (e.g., "O97" = orange 97).   Population - What site the snails originated from (FC = Fogarty Creek, SH = Strawberry Hill, AR = Cape Arago, VD = Van Damme State Park, BM = Bodega Marine Reserve, SB = Soberanes Point).  Treatment - The treatment the snail experienced in Trial 1 (either crab or control).  Risk - A binary response indicating whether the snail was found in a safe location (0) or a "risky" location (1) within the container during the observation made on a given date. 3. Missing data codes: None 4. Specialized formats or abbreviations used: M = Male; F = Female 2\) **Trial2_1.22.24.csv** 1. Number of variables: 12 2. Number of cases/rows: 443 1. Variable list: Date - The date on which the behavioral observation was made. Each snail had 5 observations on consecutive days during Trial 2, so dates here are given by the number of the day (1, 2, 3, 4, or 5). Population - What site the snails originated from (FC = Fogarty Creek, SH = Strawberry Hill, AR = Cape Arago, VD = Van Damme State Park, BM = Bodega Marine Reserve, SB = Soberanes Point). Region - Denotes whether the population of origin was in Oregon (FC, SH, AR) or California (VD, BM, SB). Tag - The individual identifying tag number demarcating each individual snail throughout the experiment. Each snail received a tag with a unique color + number combination (e.g., "O97" = orange 97).   Family - Denotes snails originating from the same cluster of egg capsules when collected in the field (noted as the population of origin and a number, e.g., "AR-11"). Container - The experimental container housing the snail (see Fig. S1 in manuscript) Each container housed five snails in Trial 2 Sex - The sex of the snail, Male or Female. Treatment_Old - The treatment the snail experienced in Trial 1 (either crab or control).  Treatment_New - The treatment the snail experienced in Trial 2 (either crab or control).  Treatment_Combo - The treatment the snail experienced in Trial 1 and Trial 2 (denoted as Trial 1-Trial 2, e.g., "Crab-Control" means a snail that experienced the crab treatment in Trial 1 and then the control treatment in Trial 2).  Risk_prop_New - The average binary response indicating whether the snail was found in a safe location (0) or a "risky" location (1) within the container during each observation across the entirety of Trial 2 (i.e., the proportion of risk taking behavior for each snail across Trial 2). Risk_prop_Old - The average binary response indicating whether the snail was found in a safe location (0) or a "risky" location (1) within the container during each observation across the entirety of Trial 1 (i.e., the proportion of risk taking behavior for each snail across Trial 1). 3. Missing data codes: None 4. Specialized formats or abbreviations used: M = Male; F = Female 3\) **FearMemCollapsed_Trial2SnailsOnly_3.21.24.csv** 1. Number of variables: 12 2. Number of cases/rows: 443 1. Variable list: Tag - The individual identifying tag number demarcating each individual snail throughout the experiment. Each snail received a tag with a unique color + number combination (e.g., "O97" = orange 97).   Block_T1 - Denotes which elevated container the experimental container was placed under (see Fig. S1 on manuscript). There were 12 blocks total in Trial 1 with six seawater control containers and six housing crabs. Container_T1 - The experimental container housing the snail (see Fig. S1 in manuscript). Each container housed one male and one female snail in Trial 1. Population - What site the snails originated from (FC = Fogarty Creek, SH = Strawberry Hill, AR = Cape Arago, VD = Van Damme State Park, BM = Bodega Marine Reserve, SB = Soberanes Point). Family - Denotes snails originating from the same cluster of egg capsules when collected in the field (noted as the population of origin and a number, e.g., "AR-11"). Container_T2 - The experimental container housing the snail (see Fig. S1 in manuscript). Each container housed five snails in Trial 2. Sex - The sex of the snail, Male or Female. Treatment_Old - The treatment the snail experienced in Trial 1 (either crab or control).  Treatment_New - The treatment the snail experienced in Trial 2 (either crab or control).  Treatment_Combo - The treatment the snail experienced in Trial 1 and Trial 2 (denoted as Trial 1-Trial 2, e.g., "Crab-Control" means a snail that experienced the crab treatment in Trial 1 and then the control treatment in Trial 2).  Risk_prop_New - The average binary response indicating whether the snail was found in a safe location (0) or a "risky" location (1) within the container during each observation across the entirety of Trial 2 (i.e., the proportion of risk taking behavior for each snail across Trial 2). Risk_prop_Old - The average binary response indicating whether the snail was found in a safe location (0) or a "risky" location (1) within the container during each observation across the entirety of Trial 1 (i.e., the proportion of risk taking behavior for each snail across Trial 1). Egg_binary - A "1" was given to females that laid eggs at any time throughout Trial 1. Only animals that laid eggs have a value, blank cells indicate either males that could not lay eggs or females that did not lay eggs. Mussels_eaten_T1 - Number of mussels eaten per container over the course of Trial 1 (total number of mussels consumed over the 12 week period). Feeding could only be measured per container (not individual) so the value was assigned to a random individual in each container. Mussels_eaten_T1_perIndperWk - The total number of mussels eaten per container over the course of the Trial 1 divided by the total amount of time in weeks (12) and the number of snails per container (2) to estimate the number of mussels eaten per individual. Mussels_eaten_T2 - Number of mussels eaten per container over the course of Trial 2 (total number of mussels consumed over the 5 day period). Feeding could only be measured per container (not individual) so the value was assigned to a random individual in each container. Mussels_eaten_T2_perIndperWk - The total number of mussels eaten per container over the course of the Trial 2 divided by the total amount of time in weeks (1) and the number of snails per container (5) to estimate the number of mussels eaten per individual. Length_PreT1 - The length of the snail from spire tip to siphonal notch measured using calipers in taken prior to the start of Trial 1 (mm). Weight_PreT1 - The weight or live mass of the snail measured using a balance taken prior to the start of Trial 1 (g). WL_PreT1 - The Weight-to-Length ratio of each snail calculated by dividing the weight by the length of the snails measured at the start of Trial 1 (g/mm). Length_PostT1 - The length of the snail from spire tip to siphonal notch measured using calipers in taken after the 12 week experimental period of Trial 1 (mm). Weight_PostT1 - The weight or live mass of the snail measured using a balance taken after the 12 week experimental period of Trial 1 (g). WL_PostT1 - The Weight-to-Length ratio of each snail calculated by dividing the weight by the length of the snails measured after the 12 week experimental period of Trial 1 (g/mm). Length_PreT2 - The length of the snail from spire tip to siphonal notch measured using calipers in taken prior to the start of  Trial 2 (mm). Weight_PreT2 - The weight or live mass of the snail measured using a balance taken prior to the start of Trial 2 (g). WL_PreT2 - The Weight-to-Length ratio of each snail calculated by dividing the weight by the length of the snails measured at the start of Trial 2 (g/mm). Change_L_T1 - The change in length of each snail during Trial 1 calculated by subtracting the length prior to Trial 1 from the length after Trial 1 (mm). Change_W_T1 - The change in weight of each snail during Trial 1 calculated by subtracting the weight prior to Trial 1 from the weight after Trial 1 (g). Change_WL_T1 - The change in weight-to-length ratio of each snail during Trial 1 calculated by subtracting the weight-to-length prior to Trial 1 from the weight-to-length after Trial 1 (g/mm). Notes - Any additional notes explaining missing values or data modifications (for change in length (Change_L_T1) we found a small number of snails that had a small but negative value (&lt; -0.03mm) for their change and corrected these to zero in order to fit our model distribution).  3. Missing data codes: Egg_binary - Only animals that laid eggs have a value, blank cells indicate either males that could not lay eggs or females that did not lay eggs. Mussels_eaten_T1 - Number of mussels eaten was only measured per container (not individual) so the value was assigned to a random individual in each container. Mussels_eaten_T1_perIndperWk - Number of mussels eaten was only measured per container (not individual) so the value was assigned to a random individual in each container. Mussels_eaten_T2 - Number of mussels eaten was only measured per container (not individual) so the value was assigned to a random individual in each container. Mussels_eaten_T2_perIndperWk - Number of mussels eaten was only measured per container (not individual) so the value was assigned to a random individual in each container. Length, Weight, Weight-to-Length Ratio and changes in these measures - All reasons for blank cells are described in the Notes column. 4. Specialized formats or abbreviations used: M = Male; F = Female ## Code/Software The code included is an R markdown/notebook file (R version 3.5.1). We used packages: ggplot2, emmeans, plyr, car, lme4, lmerTest, MASS, multcomp, glmmTMB, bbmle, tweedie, DHARMa, performance, gap. All of our analyses are coded within this document.