a<-file.choose() aa<-read.table(a,skip=1,sep="\t") bb<-aa[,1] aa<-aa[,2:length(aa)] for (cycle in 1: length (aa[,1])){ b<-aa[cycle,] pdf(width=6,height=6,file=as.character(bb[cycle])) par(mfrow=c(2,1)) x<-("") for (cycle2 in 1:length(b)){ x<-paste(x,b[cycle2],"") } b<-as.numeric(b) plot(sort(b),type="h",main=as.character(bb[cycle])) points(sort(b)) hist(b,breaks=(length(b)/3),main=sort(x)) dev.off() }