J.C.Rougier@durham.ac.uk
2000-Oct-10 07:47 UTC
[Rd] Unreliable example in ?layout (PR#688)
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._