Re: [Rd] plot with NAs in x and type="s" (PR#9046)

From: <maechler_at_stat.math.ethz.ch>
Date: Mon 03 Jul 2006 - 10:00:29 GMT


>>>>> "ReneL" == Rene Locher <lor@zhwin.ch>
>>>>> on Fri, 30 Jun 2006 15:26:18 +0200 (CEST) writes:

    ReneL> Full_Name: René Locher Version: Version 2.3.1
    ReneL> (2006-06-01) OS: i386, mingw32 Submission from:
    ReneL> (NULL) (160.85.104.70)

    ReneL> The problem seems to occur only, when you want to
    ReneL> plot a vector containing a NA value at position 2 and     ReneL> the plotting type is "s" or "S".

Yes, thank you, René.

An even simpler example is

   plot(0 / -1:1, type = "s")

This will be fixed in R-patched and R-devel as of tomorrow's snapshots.

Martin Maechler, ETH Zurich

    ReneL> ## start of code

    ReneL> O3<-c(0.8,NA,0.7,1.1,0.9,5.5,1.3,1,1.2)

    ReneL> ## The following error is reported with the two commands below:     ReneL> ## Error in plot.xy(xy, type, ...) : unable to allocate memory (in GPolygon)

    ReneL> plot(O3,type="s")
    ReneL> plot(O3,type="S")

    ReneL> ## The following commands work without problems
    ReneL> plot(O3,type="l")
    ReneL> plot(c(0.6, O3),type="s")
    ReneL> plot(c(0.4,0.6, O3),type="s")
    ReneL> plot(O3[2:length(O3)], type="s")

    ReneL> ## end of code

    ReneL> Kind regards

    ReneL> René



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Jul 03 21:20:46 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 03 Jul 2006 - 16:24:25 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.