line plot with NA
Martin Maechler <firstname.lastname@example.org>
Thu, 2 Apr 1998 20:20:38 +0200
>>>>> "tony" == Anthony Rossini <email@example.com> writes:
>>>>> "Bill" == Bill Simpson <firstname.lastname@example.org> writes:
Bill> (See why I am using NA? I can work around this problem by using
Bill> intensityan and intensitycb)
Bill> Now do a plot of peakan: plot(intensity, peakan, pch=10,type="b")
Bill> The plot skips the point (260000,NA), but no line beyond
Bill> I think the behaviour should be to draw a line between
Bill> (180000,7.4) and (310000,8.4).
tony> I respectfully disagree. If the data were in fact longitudinal
tony> data, with missing observations, one valid scenario would be to
tony> halt, which is what is happening.
I'm with Tony (and the S(-plus) developers are, too).
Bill, note that the current behavior is really the desired one
in typical time-series situations with missing values:
The missing values *are* graphically missing,
which you would really want, especially in exploratory sitatuations.
((we had quite a few data analysis projects with enviromental data over
time, where it was important to visualize the "measurement gaps")).
tony> Maybe a na.omit flag would be appropriate for plot? (is there
tony> one? I'm just speculating, not having easy access to R or Splus
There's none, currently (neither R nor S-plus).
In R ( version >= 0.62 , == UNSTABLE)
you could use
plot(peakan ~ intens, subset = !is.na(peakan), pch=10,type="b")
to get the result you want.
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: email@example.com