Chisqnozones <- read.csv("~/Desktop/R stuff/Chisqnozones.csv") groundshelterx<-Chisqnozones$X.Ground.shelter plantshelterx<-Chisqnozones$X.Plant.shelter verticalshelterx<-Chisqnozones$X.Vertical.shelter nz<-rbind(groundshelterx,plantshelterx,verticalshelterx) dimnames(fd)<-list(c("groundshelterx","plantshelterx", "verticalshelterx"), rep(c("G. mutilata","G. oceanica","H. frenatus","L. lugubris"), 2)) chisq.test(nz) barplot(nz, beside=TRUE) #Ground shelter G.mutilata vs plant G.mutilata vs vertical G.mutilata gmo<-nz[,c(1)] chisq.test(gmo) barplot(gmo, beside = TRUE) ##Ground shelter G.oceanica vs plant G.oceanica vs vertical G.oceanica goo<-nz[,c(2)] chisq.test(goo) barplot(goo, beside = TRUE) ##Ground shelter H.frenatus vs plant H.frenatus vs vertical H.frenatus hff<-nz[,c(3)] chisq.test(hff) barplot(hff, beside = TRUE) #Ground shelter L.lugubris vs plant L.lugubris vs vertical L.lugubris lll<-nz[,c(4)] chisq.test(lll) barplot(lll, beside=TRUE) PlotNoZones <- read.csv("~/Desktop/R Stuff/PlotNoZones.csv") ggplot(data=Plotfielddata2, aes(x=Species, y=Count))+ geom_bar(aes(fill=Substrate), stat = "identity", position = "dodge")