From telford@progsoc.uts.edu.au  Mon Feb  7 04:41:05 2000
From: telford@progsoc.uts.edu.au (Telford Tendys)
Date: Mon, 7 Feb 2000 15:41:05 +1100
Subject: [Rd] small bug in plot code
Message-ID: <20000207154105.A31175@ftoomsh.progsoc.uts.edu.au>

I get a segfault from:

R> plot( x, y, log="does this work?" )

[telford@faraday ring-core]$ R --version
Version 0.64.2  (July 3, 1999)
Copyright (C) 1999 R Development Core Team

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License.  For more information about
these matters, see http://www.gnu.org/copyleft/gpl.html.

(gdb) up
#3  0x80927c2 in do_plot_window (call=0x40269760, op=0x4025ceac, 
    args=0x4060f428, env=0x4060f400) at plot.c:373
373                 errorcall(call,"invalid \"log=%s\" specification\n",*p);

(gdb) list
371                 break;
372             default:
373                 errorcall(call,"invalid \"log=%s\" specification\n",*p);
374             }
375             p++;

The type of *p is char which doesn't match the %s specification,
either use %c with *p or use %s with p for example:

       errorcall( call, "invalid \"log=%c\" specification\n", *p );

Hope this hasn't been fixed already, I installed the SRPM from RedHat
so everyone else is probably ahead of me. When I use the correct log="xy"
parameter for the plot function, logarithmic plotting is working correctly.
Yes I admit that I found the documentation for plot.default after I tried
a bunch of other things and traced through the code. There is nothing wrong
with your documentation, it's just me.

	- Tel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] small bug in plot code
Telford Tendys