Skip to content

histogram

1 message · arun

#
Hi,

I guess this is what you wanted.
Attaching a plot from a subset (lstSub)



dat1<- read.csv("rightest.csv",sep=",",header=TRUE,check.names=FALSE) 
label1=c("0-25","25-50","50-75") 
Name1<-unlist(lapply(0:123,function(i) rep(i+1,i))) 
dat1New<- dat1[,-1]
vec1<- unlist(lapply(seq_len(nrow(dat1New)),function(i) dat1New[i,][1:which(dat1New[i,]==0)-1]))
dat3<-data.frame(Name1,vec1)
dat3$Categ<-as.character(cut(dat3$vec1,breaks=seq(0,75,25),labels=label1))
source("k.txt")
lst1<- split(dat3,dat3$Name1)
#lstSub<-split(dat3,dat3$Name1)[1:4]

pdf("ElisaNew0_25.pdf")
?lapply(lst1,function(x) {indx025<-which(x$Categ=="0-25"); indx2550<-which(x$Categ=="25-50");indx5075<-which(x$Categ=="50-75"); if(length(indx025)>=1) {matplot(k[,indx025],ylim=c(0,5),type="l",col="grey",main=paste("range 0-25","line=",unique(x$Name1),sep=" "),xlab="T",ylab="Q"); lines(k[,unique(x$Name1)],type="l",col="black")} else NULL})
dev.off()

pdf("ElisaNew25_50New.pdf")
?lapply(lst1,function(x) {indx025<-which(x$Categ=="0-25"); indx2550<-which(x$Categ=="25-50");indx5075<-which(x$Categ=="50-75"); if(length(indx2550)>=1) {matplot(k[,indx2550],ylim=c(0,5),type="l",col="grey",main=paste("range 25-50","line=",unique(x$Name1),sep=" "),xlab="T",ylab="Q"); lines(k[,unique(x$Name1)],type="l",col="black")} else NULL})
dev.off()

pdf("ElisaNew50_75.pdf")
?lapply(lst1,function(x) {indx025<-which(x$Categ=="0-25"); indx2550<-which(x$Categ=="25-50");indx5075<-which(x$Categ=="50-75"); if(length(indx5075)>=1) {matplot(k[,indx5075],ylim=c(0,5),type="l",col="grey",main=paste("range 50-75","line=",unique(x$Name1),sep=" "),xlab="T",ylab="Q"); lines(k[,unique(x$Name1)],type="l",col="black")} else NULL})
dev.off()


A.K.