# "AutoDedicClmVEx45.R"
# Need to replace URL, skipi, mVav equation depending on the file.
quartz(width=11, height=7.5)
op <- par(mfrow = c(2, 3), # 2 x 2 pictures on one plot
          pty = "m")       # square plotting region,
skipi<-c(20, 159,298,439,578,717)   # 043
# skipi<-c(22, 161,300,451,590,729)   # 044
URL<-"http://www.bio.umass.edu/biology/kunkel/LabWiki/images/e/ef/Chris045.txt"
LIX<-'Chloride'    #   'Proton'
filnam<-strsplit(URL,'/')
lfil<-length(filnam[[1]])
filnam<-filnam[[1]][lfil]
for(i in 1:6) { skiplin<-skipi[i]
XX<-read.csv(URL, skip=skiplin, nrows=121)
attach(XX)
print(names(XX))
mVav<-(DiffCl1_1_mV + DiffCl1_2_mV + DiffCl1_2_mV)/3    # Cl
# mVav<-(DiffH1_1_mV + DiffH1_2_mV + DiffH1_2_mV)/3    # H
plot(Y_microns,mVav,
        'b', 
        col=rainbow(121), 
        lwd= (1:121)/11, 
        main=paste(skiplin, 'Hours from =', Hrs_From[1])) 
mtext(paste(filnam,LIX))        
lines(Y_microns,mVav , col='red')
detach(XX)
              }


