Re: [R] Missing Data Line Type?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 25 May 2005 - 07:20:41 EST

On 5/24/05, khobson@fd9ns01.okladot.state.ok.us <khobson@fd9ns01.okladot.state.ok.us> wrote:
>
>
>
>
> I have a general question. Is there a setting that can be used for a
> multiple line type? The situation is that I want a solid line between x
> and y points but if the y point is missing, I want a dashed line type to
> the next point. In other words, if point 1 to 2 exists, make that line
> solid, otherwise, make it dashed up to the next existing x/y point.

plot(approx(x), type = "l", lty = 2)
lines(x)

>
> Additionally, what plot type would you recommend for a plot with two Y
> points per X? The two points would be joined by a vertical line. The
> average of the two is the dual type line described above.

See ?segments .

Also you might be able to use directly or else scavenge code from plotCI in package gplots (in the gregmisc bundle) or plotOHLC in package tseries.



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 Received on Wed May 25 07:35:26 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:01 EST