A friend of mine added plot code to the function SimpleTS() as follows 
but it misses the single point between two missing points:

SimpleTS <- function() { 
  fileStg <- "C:/ad/dta/TryRRead/Rcode/SHIYU/SimpleTS.dta" 
  titleline <- readLines(fileStg, n=1) 
  print(titleline) 
  dta <- read.table(fileStg, skip = 1, header = TRUE, sep = ",", colClasses
= "character")
  print(dta) 
  dta=linearizeTime(dta) 
  print(titleline) 
  print(dta) 
  #Plot code starts
  N=ncol(dta)-1 # N function columns 
  layout(matrix(seq(from=0,to=N,by=1),ncol=1),heights =
c(0.1,rep(0.8,N-1),1))
  for(i in 2:N) { # numb of functs -1 #leave first subplot blank.
    mar<-c(0,4,0,1)
    par(mar = mar)
   
plot(dta[,1],dta[,i],xlab="",ylab=colnames(dta)[i],axes=F,pch="*",type="l")
    box()
  }
  mar<-c(4,4,0,1)
  par(mar=mar,las=0)
 
plot(dta[,1],dta[,N+1],xlab="",ylab=colnames(dta)[N+1],axes=F,pch="*",type="l")
  axis(1)
  title(xlab="time")
  box()
  #plot ends
} #end SimpleTS 
SimpleTS()


--
View this message in context: 
http://r.789695.n4.nabble.com/How-do-I-get-a-rough-quick-utility-plot-of-a-time-series-tp4522709p4538842.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to