#Data Bioluminscence # Zuur et al. 2009 #stations 1:19 stat.1 <- 8 stat.2 <- 15 ISIT <- read.table("ISIT.txt", header=T) names (ISIT) S1 <- ISIT$Sources[ISIT$Station==stat.1] D1 <- ISIT$SampleDepth[ISIT$Station==stat.1] S2 <- ISIT$Sources[ISIT$Station==stat.2] D2 <- ISIT$SampleDepth[ISIT$Station==stat.2] So <- c(S1,S2) ; De <- c(D1,D2) ID <- rep(c(stat.1,stat.2),c(length(S1),length(S2))) mi <- max(min(D1),min(D2)) me <- min(max(D1),max(D2)) I1 <- De > mi & De < me op <- par(mfrow=c(1,2)) plot(D1[I1],S1[I1],pch=16,xlab="Depth",ylab = "Sources", col="blue", xlim=c(500,3000),ylim = c(0,40)) plot(D2[I1],S2[I1],pch=16,xlab="Depth",ylab = "Sources", col="red", xlim=c(500,3000),ylim = c(0,40)) par(op)