[R] Semicolons (was: clip to keep coordinate system?)

Jan T. Kim jtk at cmp.uea.ac.uk
Mon Aug 15 13:17:18 CEST 2005


On Tue, Aug 09, 2005 at 07:49:36AM -0700, Thomas Lumley wrote:
> On Tue, 9 Aug 2005 ivo_welch-rstat8303 at mailblocks.com wrote:
> 
> >
> > dear R wizards:
> >
> > plot( 1, 1, ylim=(2,10), xlim=(2,10), type="n");
> > rect( -1, -1, 12, 12, col=gray(0.99) );
> >
> > unfortunately wipes out the border axes around the plot.  how do I keep
> > this?
> 
> I think you meant
>    plot( 1, 1, ylim=c(2,10), xlim=c(2,10), type="n")
>    rect( -1, -1, 12, 12, col=gray(0.99) )
> Your code has two syntax errors and two spurious semicolons.

What's wrong with the semicolons? Technically, they're not necessary,
but they definitely improve readability without doing any harm.

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |    *NEW*    email: jtk at cmp.uea.ac.uk                               |
 |    *NEW*    WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*




More information about the R-help mailing list