### Packages library(ggplot2) library(dplyr) library(tidyr) ##### t-test for Exploration scores in the novel arena test and Year ##### Analysis <- read.csv("E:SUPPLEMENTARY_DATA_1.csv", sep=",",header=TRUE) Analysis<- subset(Analysis, Exploration_UniqueSectorVisits != "na") Analysis$Exploration_UniqueSectorVisits <- as.numeric(Analysis$Exploration_UniqueSectorVisits) Analysis$Exploration_TotalSectorVisits <- as.numeric(Analysis$Exploration_TotalSectorVisits) Analysis$Year_novel_arena <- as.numeric(Analysis$Year_novel_arena) t.test(Exploration_UniqueSectorVisits~Year_NovelArenaTest, data= Analysis) t.test(Exploration_TotalSectorVisits~Year_NovelArenaTest, data= Analysis) ##### Consistency within context novel arena test ##### Analysis$Species <- factor(Analysis$Species, levels = c("SGF", "MGF", "STF", "MTF","GFC", "YW")) ###### Spearman's Correlations among novel arena test scores ###### cor.test(Analysis$Exploration_UniqueSectorVisits, Analysis$Exploration_TotalSectorVisits, method = "spearman", exact = FALSE) #### Plot Figure_S1 <- ggplot(Analysis, aes(x=Exploration_UniqueSectorVisits, y=Exploration_TotalSectorVisits)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 2, 16, 17, 4, 8)) + xlab("Novel Arena (unique sectors)") + ylab("Novel Arena (total sectors)") + theme_classic() Figure_S1 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(-35, 260)) ##### Validation across context between novel arena test and novel object test ##### Analysis<- subset(x =Analysis, subset = Exploration_LatencyTo10Meters != "na") Analysis$Exploration_LatencyTo10Meters <- as.numeric(Analysis$Exploration_LatencyTo10Meters) Analysis$Exploration_InverseLatencyTo10Meters <- as.numeric(Analysis$Exploration_InverseLatencyTo10Meters) ###### Principal Component Analysis from the novel arena test scores ###### local({ .PC <- princomp(~Exploration_TotalSectorVisits+Exploration_UniqueSectorVisits, cor=TRUE, data=Analysis) cat("\nComponent loadings:\n") print(unclass(loadings(.PC))) cat("\nComponent variances:\n") print(.PC$sd^2) cat("\n") print(summary(.PC)) screeplot(.PC) Analysis <<- within(Analysis, { PC_Exploration <- .PC$scores[,1] }) }) ###### Spearman's Correlations between novel arena test and novel object test ###### cor.test(Analysis$PC_Exploration, Analysis$Exploration_InverseLatencyTo10Meters, method = "spearman", exact = FALSE) Figure_1 <- ggplot(Analysis, aes(x=PC_Exploration, y=Exploration_InverseLatencyTo10Meters)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 16, 17, 8)) + xlab("Novel arena (PC_Exploration)") + ylab("Novel object (latency to 10m)") + theme_classic() Figure_1 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(0, 10)) ##### Spearman's Correlations between Foraging scores and Neophilia scores ##### Analysis <- read.csv("E:SUPPLEMENTARY_DATA_2.csv", sep=",",header=TRUE) cor.test(Analysis$ForagingTechnique_DiversityIndex, Analysis$%Ind_Into10m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingSubstrate_DiversityIndex, Analysis$%Ind_Into10m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingAverage_DiversityIndex_Diversity, Analysis$%Ind_Into10m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingTechnique_DiversityIndex, Analysis$%Ind_Into3m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingSubstrate_DiversityIndex, Analysis$%Ind_Into3m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingAverage_DiversityIndex_Diversity, Analysis$%Ind_Into3m_PerTrial, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingTechnique_DiversityIndex, Analysis$Latency_to_10_m, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingSubstrate_DiversityIndex, Analysis$Latency_to_10_m, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingAverage_DiversityIndex_Diversity, Analysis$Latency_to_10_m, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingTechnique_DiversityIndex, Analysis$Latency_to_3_m, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingSubstrate_DiversityIndex, Analysis$Latency_to_3_m, method = "spearman", exact = FALSE) cor.test(Analysis$ForagingAverage_DiversityIndex_Diversity, Analysis$Latency_to_3_m, method = "spearman", exact = FALSE) #### Plots (Just statistical significant correlations) Analysis$Species <- factor(Analysis$Species, levels = c("SGF", "MGF", "STF", "MTF","GFC", "YW")) Figure_2 <- ggplot(Analysis, aes(x=ForagingAverage_DiversityIndex, y=Latency_to_3_m)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 2, 16, 17, 4, 8)) + xlab("Average Foraging Diversity") + ylab("Latency to 3m") + theme_classic() Figure_2 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(-1.1, 3.5)) Figure_3 <- ggplot(Analysis, aes(x=ForagingTechnique_DiversityIndex, y=%Ind_Into3m_PerTrial)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 2, 16, 17, 4, 8)) + xlab("Foraging Technique") + ylab("% Response to 3m") + theme_classic() Figure_3 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(-6, 33)) Figure_S3 <- ggplot(Analysis, aes(x=ForagingTechnique_DiversityIndex, y=Latency_to_3_m)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 2, 16, 17, 4, 8)) + xlab("Foraging Technique") + ylab("Latency to 3m") + theme_classic() Figure_S3 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(-0.8, 4)) Figure_S4 <- ggplot(Analysis, aes(x=ForagingSubstrate_DiversityIndex, y=Latency_to_3_m)) + geom_jitter(height = 0.03,width = 0.04, alpha= 0.7, size = 10, stroke= 3, aes(shape= Species)) + stat_smooth(method="lm", se=T, colour = "black", fullrange=T) + scale_shape_manual(values = c(1, 2, 16, 17, 4, 8)) + xlab("Foraging Substrate") + ylab("Latency to 3m") + theme_classic() Figure_S4 + theme(axis.text=element_text(size= 20), axis.title = element_text(size=35)) + scale_color_brewer(palette="Dark2") + theme(legend.position = "bottom") + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text=element_text(size= 30), axis.title = element_text(size=50)) + theme(axis.text = element_text(face="bold")) + theme(axis.title = element_text(face="bold"))+ theme(legend.title = element_blank()) + theme(legend.key.height= unit(0.75, 'cm'), legend.key.width= unit(0.75, 'cm')) + theme(legend.text = element_text(size=35)) + theme(legend.position = "right") + theme(legend.background = element_rect(size=1, linetype="solid", colour ="black"))+ coord_cartesian( ylim = c(-1.5, 4))