tableR <- read.table(file="ex15_recpost.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableT <- read.table(file="ex15_thetapost.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
nloci <- 1;#
for(x in 1:nloci) {#
	par(mfrow=c(2,2))#
	hist(tableR[,x]);#
	hist(tableT[,x]);#
	plot(tableR[,x],tableT[,x]);#
	reg <- lm(tableR[,x]~tableT[,x]);#
	reg;#
	RT <- tableR[,x]/tableT[,x];#
	hist(RT);#
}
for(x in 1:nloci) {#
	par(mfrow=c(2,1))#
	hist(tableR[,x]);#
	hist(tableT[,x]);#
}
for(x in 1:nloci) {#
	par(mfrow=c(1,2))#
	hist(tableR[,x]);#
	hist(tableT[,x]);#
}
tableG0001 <- read.table(file="gamma0001.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG01 <- read.table(file="gamma01.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG05 <- read.table(file="gamma05.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG1 <- read.table(file="gamma1.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG2 <- read.table(file="gamma2.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG5 <- read.table(file="gamma5.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG10 <- read.table(file="gamma10.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableG100 <- read.table(file="gamma100.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
par(mfrow=c(2,3));#
#hist(tableG0001[,1],freq=TRUE,nclass=30);#
hist(tableG01[,1],freq=TRUE,nclass=30,ylim=c(0,30));#
#hist(tableG05[,1],freq=TRUE,nclass=30);#
hist(tableG1[,1],freq=TRUE,nclass=30,ylim=c(0,30));#
#hist(tableG2[,1],freq=TRUE,nclass=30);#
#hist(tableG5[,1],freq=TRUE,nclass=30);#
hist(tableG10[,1],freq=TRUE,nclass=30,ylim=c(0,30));#
#hist(tableG1000[,1],freq=TRUE,nclass=30);#
#
len = c(0:998)#
#par(mfrow=c(2,4));#
#plot(len,tableG0001[,1])#
plot(len,tableG01[,1],ylim=c(0,30))#
#plot(len,tableG05[,1],ylim=c(0,12))#
plot(len,tableG1[,1],ylim=c(0,30))#
#plot(len,tableG2[,1],ylim=c(0,12))#
#plot(len,tableG5[,1],ylim=c(0,12))#
plot(len,tableG10[,1],ylim=c(0,30))#
#plot(len,tableG1000[,1],ylim=c(0,12))
tableG01 <- read.table(file="gamma01.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);
tableG01 <- read.table(file="gamma01.out");
tableR <- read.table(file="ex17_recpost.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
tableT <- read.table(file="ex17_thetapost.out", header = T, sep = "", quote = "", dec = ".",row.names=NULL, as.is = FALSE, na.strings = "NA",colClasses = NA, nrows = 1000,skip = 0, check.names = TRUE,strip.white = FALSE, blank.lines.skip = TRUE,comment.char = "#", allowEscapes = FALSE);#
nloci <- 1;#
for(x in 1:nloci) {#
	par(mfrow=c(2,2))#
	hist(tableR[,x]);#
	hist(tableT[,x]);#
	plot(tableR[,x],tableT[,x]);#
	reg <- lm(tableR[,x]~tableT[,x]);#
	reg;#
	RT <- tableR[,x]/tableT[,x];#
	hist(RT);#
}
