Re: [R] line plot through NA

From: Doran, Harold <HDoran_at_air.org>
Date: Mon 02 Oct 2006 - 15:16:06 GMT


Do you mean something like this:

 plot(approx(Day,V), type='l')

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of
> rggefrm@ucl.ac.uk
> Sent: Monday, October 02, 2006 10:32 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] line plot through NA
>
> Dear R-help list,
>
> I hope I did not miss something obvious, because my question
> seems very simple, but I couln't figure out how to do it.
>
> If I have the following data:
> Day<-c(1,2,3,4,5,6,7)
> V<-c(5,NA,10,30,45,NA,10)
> than the line in plot
>
> plot(V~Day, type="b")
>
> will start with the 3rd value and stop stop at the 5th value
> because all NA are omitted. Is there now a parameter which
> can be added to the plot function so the line will start with
> with the first value and skip the NA values and can this than
> applied to xyplots.
>
> Many thanks
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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. Received on Tue Oct 03 01:25:06 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Oct 2006 - 16:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.