<style type='text/css'>.TerraceMsg { font-size: 12px; font-family:Dotum, Arial, Verdana, Sans-Serif;}.Bold { font-weight: bold; }</style><div class='TerraceMsg'><p><span style="font-size: 11pt;">I have a csv file contains hourly PM10 concentration of 1 march to 7 march. </span><a href="https://drive.google.com/file/d/0ByY3OAw62EShdEdqcUVHVTNabnM/view?usp=sharing" target="_blank"><span style="font-size: 11pt;">Please, download from here</span></a><span style="font-size: 11pt;">. I have already plotted all the hourly variogram (total 161) in a loop by automap package. Here is the coad, this code work properly</span></p><p> </p><p><span style="font-size: 11pt;">    library(sp)</span><br><span style="font-size: 11pt;">    library(gstat)</span><br><span style="font-size: 11pt;">    library(rgdal)</span><br><span style="font-size: 11pt;">    library(automap)</span><br><span style="font-size: 11pt;">    library(latticeExtra)</span><br><span style="font-size: 11pt;">    </span><br><span style="font-size: 11pt;">    seoul1to7<-read.csv("Downloads/seoul1to7.csv")</span><br><span style="font-size: 11pt;">    seoul1to7[seoul1to7==0] <-NA</span><br><span style="font-size: 11pt;">    seoul1to7 <- na.omit(seoul1to7)</span><br><span style="font-size: 11pt;">    seoul1to7_split<-split(seoul1to7,seoul1to7$time) </span><br><span style="font-size: 11pt;">    seq(seoul1to7_split)</span><br><span style="font-size: 11pt;">    </span><br><span style="font-size: 11pt;">    </span></p><p><span style="font-size: 11pt;">    </span><span style="font-size: 11pt;">vars<-lapply(seq(seoul1to7_split), function(i)</span><br><span style="font-size: 11pt;">    {</span><br><span style="font-size: 11pt;">      dat<-seoul1to7_split[[i]]  </span><br><span styl
e="font-size: 11pt;">      coordinates(dat)<-~LON+LAT</span><br><span style="font-size: 11pt;">      proj4string(dat) <- "+proj=longlat +datum=WGS84" </span><br><span style="font-size: 11pt;">      dat <- spTransform(dat, CRS("+proj=utm +north +zone=52 +datum=WGS84"))</span><br><span style="font-size: 11pt;">      variogram<-autofitVariogram(log(PM10)~1,dat, model="Sph")</span><br><span style="font-size: 11pt;">      plot<- plot(variogram,plotit=FALSE, asp=1)</span><br><span style="font-size: 11pt;">      </span><br><span style="font-size: 11pt;">      return(plot)</span><br><span style="font-size: 11pt;">    })</span><br><span style="font-size: 11pt;">    vars[[1]]</span><br><span style="font-size: 11pt;">    vars[[2]]</span></p><p><span style="font-size: 11pt;"> </span><br><span style="font-size: 11pt;">Here, I can get the individual plot by `vars[[1]], vars[[2]]...`etc command but all the variogram has a same title. Now, I want to get all the variogram  with different title in a loop. I want my variogram title be like, "Variogram for 2012-03-01 1.00",  </span><span style="font-size: 11pt;">"Variogram for 2012-03-01 2.00" .....etc. To do this I wrote this code but It doesn't work!</span></p><p> </p><p><span style="font-size: 11pt;">    a<-as.POSIXct(names(seoul1to7_split), format="%Y%m%d%H")</span><br><span style="font-size: 11pt;">    a</span><br><span style="font-size: 11pt;">    hours<-substr(a,1,16)</span><br><span style="font-size: 11pt;">    hours</span></p><p><span style="font-size: 11pt;"></span> </p><p><span style="font-size: 11pt;">vars_hourly<-lapply(seq(seoul1to7_split), function(j)<br>  {<br>  plot.hour<- vars[seq[j]]<br>  plot.hour<- upda
te(plot.hour, main= paste("Variogram for", hours[j]))<br>  return(plot.hour)<br>})</span></p><p><span style="font-size: 11pt;">vars_hourly[[1]]</span></p><p><span style="font-size: 11pt;"></span> </p><p> </p><p><span style="font-size: 11pt;">I keep my desired different title in `hours` variable like "2012-03-01 01:00", "2012-03-01 02:00", "2012-03-01 03:00" ...etc. </span><span style="font-size: 11pt;">could you please help me to plot all the variograms (total 161)  with different title? I am badly struck with this problem. Thanks.</span></p><p><span style="font-size: 11pt;"> </span></p><p><span style="font-size: 11pt;">Orpheus</span> </p></div><br><br/><br/><table border=0 cellpadding=0 cellspacing=0 ><tr><td style='vertical-align: top;font-size:9pt;'><div jquery1411706373835="566"><br></div></td></tr></table><br>
<div id='TMSMDN' style="background:url('http://mail.gist.ac.kr:80/mail/receiveMDN.do?mdnData=oGhEpHGdw7UD%2BvJWe%2BEHzoHcBfAgFkFuURvjZjANvZNDF7aPBLNFMLTagh9kQ5XnTMkDqnbUH28j%0AvknwBIVCI4%2FvD4%2FCacyTbg0IYZDwaA9q%2B6%2FPmkoZQFBjPFlJ3j8RRLKhrs0lGnQNnb1on%2B9M8Q%3D%3D%0A')"></div>