[R] bug in example(hist)?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Feb 20 21:23:37 CET 2005


T Petersen <Innkeyp-r at yahoo.com> writes:

> Alright. I typed
> 
>  > example(hist)
> 
> and I get (one) botched histogram with the title "WRONG diagram",
> while the other four diagrams won't run. I've tried to type
> 
>  > par(mfrow=c(2,3))
> 
> to see if I can get displayed the other diagrams, but there's still
> just the "WRONG diagram"-histogram. If I comment out the last two
> lines of the example(hist)-script
> 
> #hist> hist(islands, br = c(12, 20, 36, 80, 200, 1000, 17000),
> #    freq = TRUE, main = "WRONG histogram")
> 
> the other diagrams come out fine.

par(ask=TRUE) solves your problem. Setting par(mfrow...) is normally a
good idea, but it's not working when the example is setting it itself.

It's not a bug, for sure. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list