getwd() #gets your working setwd("C:/Users/robert/Desktop/Rstudio/Stylocheilus") stylocheilus_data=read.table("Moorea_Stylocheilus_data.csv", header=TRUE, sep =",") attach (stylocheilus_data) stylocheilus_data #checks to make sure data format from excell is correct head(stylocheilus_data) #check the structure of your data head dim(stylocheilus_data) #checks number of rows/co shapiro.test(hatching.time) #test for normality hatching time shapiro.test(survivorship) #- survivorship shapiro.test(Deformed) #number of deformed veligers #boxplot for survivorship vs Frequency boxplot(survivorship~Frequency,data=stylocheilus_data, xlab="Frequency (Hz)", ylab="Survivorship (%)") #stats for non parametric difference between means tests kruskal.test(survivorship ~ Frequency, data = stylocheilus_data) # kruskall wallis ranked sum use this! posthoc.kruskal.nemenyi.test(x=survivorship, g=Frequency, method="Tukey") #post-hoc kruskall wal (tukey) #boxplot for hatching time and frequency boxplot(hatching.time~Frequency, data=stylocheilus_data, ylab="Hatching time (Days)", xlab="Frequency (Hz)") kruskal.test(hatching.time ~ Frequency, data = stylocheilus_data) #kruskal-wallis ranked sum posthoc.kruskal.nemenyi.test(x=time.hatching, g=Frequency, method="Tukey") #kruskal nemenyi post hoc # boxplot for number of deformed veligers by frequency boxplot(Deformed~Frequency,data=stylocheilus_data, xlab="Frequency (Hz)", ylab="Number of Eggs with Deformed Veligers") # V kurskal wallis rankekd sum for deformed veligers by frequency kruskal.test(Deformed ~ Frequency, data = stylocheilus_data) posthoc.kruskal.nemenyi.test(x=Deformed, g=Frequency, method="Tukey") #post-hoc kruskal wal