From J.C.Rougier@durham.ac.uk  Tue Oct 10 08:47:55 2000
From: J.C.Rougier@durham.ac.uk (J.C.Rougier@durham.ac.uk)
Date: Tue, 10 Oct 2000 09:47:55 +0200 (MET DST)
Subject: [Rd] Unreliable example in ?layout (PR#688)
Message-ID: <200010100747.JAA03964@pubhealth.ku.dk>

In ?layout values of x and y from the standard gaussian that lie
outside (-3, 3) will occasionally cause an error in hist with
breaks=seq(-3, 3, 0.5).  One reliable solution (not quite as
pretty) would be to use runif instead of rnorm, ie

      x <- runif(50, -1, 1)
      y <- runif(50, -1, 1)
      xhist <- hist(x, breaks=seq(-1,1,0.25), plot=FALSE)
      yhist <- hist(y, breaks=seq(-1,1,0.25), plot=FALSE)
      top <- max(c(xhist$counts, yhist$counts))
      xrange <- c(-1,1)
      yrange <- c(-1,1)

      # and then as before.

Jonathan.

--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status = 
 major = 1
 minor = 1.1
 year = 2000
 month = August
 day = 15
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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] Unreliable example in ?layout (PR#688)
J.C.Rougier@durham.ac.uk