library(ggplot2)# ### PCSA dat<-read.table("XXXXXX/PCSA_data.txt",header=TRUE) boxplot(dat$PCSA.Gastro.Lat~dat$LifestyleSEX, data=dat, notch=TRUE,col=(c("red","blue")),main="PCSA", xlab="Satus", ylab="GastroLat") AOV_GastLat_Sexe<-summary(aov(dat$PCSA.Gastro.Lat~dat$Lifestyle+dat$Sex)) AOV_GastLat_Sexe boxplot(dat$PCSA.Gastro.Med~dat$LifestyleSEX, data=dat, notch=TRUE,col=(c("red","blue")),main="PCSA", xlab="Satus", ylab="GastroMed") AOV_GastMed_Sexe<-summary(aov(dat$PCSA.Gastro.Med~dat$Lifestyle+dat$Sex)) AOV_GastMed_Sexe boxplot(dat$PCSA.Soleus~dat$LifestyleSEX, data=dat, notch=TRUE,col=(c("red","blue")),main="PCSA", xlab="Satus", ylab="Soleus") AOV_GastSol_Sexe<-summary(aov(dat$PCSA.Soleus~dat$Lifestyle+dat$Sex)) AOV_GastSol_Sexe ## Weight OL1-6### data Mass dat<-read.table("XXXXXX/MASS_CS_data.txt",header=TRUE) ## ANOVA AOV_Masse_Sexe<-summary(aov(dat$Masse~dat$Statut*dat$Sexe)) AOV_Masse_Sexe # Notched Boxplot of Weight against 2 crossed factors : Statut(stabu/enclos/libre) and Sexe boxplot(Masse~Stat_Sex, data=dat, notch=T,col=(c("red","blue")),main="Body mASS", xlab="Satus", ylab="Weight (Kg)") pairwise.wilcox.test(dat$Masse,dat$Statut) pairwise.t.test(dat$Masse,dat$Stat_Sex) AOV_CS_Sexe<-summary(aov(dat$C.Size~dat$Statut*dat$Sexe)) AOV_CS_Sexe # Notched Boxplot of calca CS against 2 crossed factors : Statut(stabu/enclos/libre) and Sexe boxplot(C.Size~Stat_Sex, data=dat, notch=TRUE,col=(c("red","blue")),main="Centroid Size", xlab="Satus", ylab="Centroid Size") pairwise.wilcox.test(dat$C.Size,dat$Stat_Sex) ## Scatter plot ##corr test CS VS WEIGHT Pearson's product-moment correlation cor.test(x=dat$Masse,dat$C.Size) ##0.8221924 #data: dat$Masse and dat$C.Size #t = 10.214, df = 50, p-value = 7.853e-14 #alternative hypothesis: true correlation is not equal to 0 #95 percent confidence interval: 0.7081942 0.8944084 #sample estimates: cor 0.8221924 ggplot(dat, aes(x=Masse, y=C.Size,color=Statut, shape=Statut)) + geom_point()+ geom_smooth(method=lm,se=FALSE, fullrange=TRUE)