[R] how to connect dots by passing NA

From: DinoDragon <timd_huang_at_yahoo.com>
Date: Thu, 17 Apr 2008 08:56:41 +0800


This maybe a silly question. I'm trying to figure out a way to draw a line from a data set which contain NA. Say, I have a set of data as:

x <- c(1.1 2.2 NA 4.4 5.5) ; y <- c(1:5) # as x,y of point a, b, c, d, and e.

I would like to plot this to a line by using dot-line to connect the two adjacent points before and after the NA, something like: (a)______(b)......(d)______(e)

Any help will be very appreciated.

-- 


Smiles,

Timothy Huang 黃大ㄧ

43, Lane 525, Section 3, AnKang Road, XinDian City

Taipei County, Taiwan 23156, Rep. of China

台北縣23156新店市安康路三段525巷43號

Tel 886-2-2214-0517 Fax 886-2-2214-4201


Get Skype <http://www.skype.com/go/download> and call me for free.

Web: www.dinodragon.com <http://www.dinodragon.com/>

Blog: http://tw.myblog.yahoo.com/timd_huang/

Blog: http://bloguide.ettoday.com/dinodragon/
Web: http://www.meteoritefossilgallery.com/

______________________________________________
R-help_at_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.
Received on Thu 17 Apr 2008 - 03:15:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Apr 2008 - 06:30:34 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.

list of date sections of archive