[R] plotting lines when data has missing/NA values
Justin Fincher
fincher at cs.fsu.edu
Thu Jul 8 21:52:36 CEST 2010
Howdy,
I have done many searches and can't seem to find a way around this.
I am reading in a .csv file where each row is a dataset and each
column represents a position. The values are sparse (there are 2003
positions but usually only 100-200 values) and the idea is to be able
to plot each dataset (row) and overlay them in different combinations.
What I would like to do is have a plot where each data point is
connected by a line, but since there are numerous NA values between
each real data value, I have yet to find out to do this. Essentially
I would like each data point to be connected to the next non-NA data
point. I also thought about subsetting the relevant data points out,
but am unsure how to do this while retaining the column numbers so
they will not be affected spatially. Any help would be greatly
appreciated.
- Fincher
More information about the R-help
mailing list