Egg laying Assays

Reading in the egg laying data

setwd("~/Box Sync/Ulmschneider manuscript/final_plots_with_scripts")
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.1.3
library(plyr)
## Warning: package 'plyr' was built under R version 3.1.3
library(reshape2)
## Warning: package 'reshape2' was built under R version 3.1.2
source("commonPlots.R")
d= read.csv("Nhe2_egg_lays/160728_egglays_2days.csv")

Plotting the egg laying data

d$Genotype = relevel(d$Genotype, "OrR")
p1 = ggplot(d, aes(x=Genotype, y = eggsPerDay))
errorBarCrossHatch(p1) +  scale_y_continuous(breaks = seq(from = 0, to =50, by =5), limits = c(0,50))

plot of chunk unnamed-chunk-2

t-test for the egglaying data shows statistical significance

t.test(eggsPerDay ~ Genotype, data = d)
## 
##  Welch Two Sample t-test
## 
## data:  eggsPerDay by Genotype
## t = 3.5122, df = 6.539, p-value = 0.01098
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##   5.964762 31.667986
## sample estimates:
##     mean in group OrR mean in group Nhe2-/- 
##             27.723977              8.907602
sum = ddply(d, .(Genotype), summarise, n = sum(females), N= length(Genotype), mean = mean(eggsPerDay), sd= sd(eggsPerDay), se = sd/sqrt(N))