[R] Plot link points

Kitty Lee lee.kitty at yahoo.com
Sat Jan 10 09:50:38 CET 2009


Hi. This may be a straight-forward question...

I have a time series from 1950 to 2000 (by year) with missing values. 

Sometimes only a year has value and the adjacent years have missing data, e.g.

1950 2.7
1951 
1952
1953 3.4
1954
1955
1956 2.9
1957 3.6
1958 2.7


When I use plot (type='l'), the line can't connect the 'stand-alone' years. Is there a way I have have R to skip over the NA and draw a line with the points available?

Thanks!

k.




More information about the R-help mailing list