[R] plotting time series with data gap using type line- but do not want to connect gap with line

2009-05-28 Thread Josef . Kardos
I have a time series of about 1500 measurements. There are sporadic data gaps. I would like to plot the time series with type line. I only want a line to connect the periods with data; I don't want a line to connect the points across a data gap. Is there a function or recommended method to

Re: [R] plotting time series with data gap using type line- but do not want to connect gap with line

2009-05-28 Thread Gabor Grothendieck
Just place a point with an NA value between the two segments. Here is one way to do it in zoo: set.seed(123) library(zoo) # create sample data tt - c(1:1000, 1200:2000) z - zoo(rnorm(length(tt)), tt) # this will fill in omitted values with NAs z - as.zoo(as.ts(z)) plot(z) On Thu, May 28,