[Rd] histbackback function code needs a change with R 2.4.1 version (PR#9456)

From: <MATILDE.TREVISANI_at_econ.units.it>
Date: Tue 16 Jan 2007 - 10:30:14 GMT


Dear Author and Maintainer of Hmisc contributed package, Dear R developers,  

i noticed a problem with histbackback routine when i installed the last version of R (2.4.1) (With my previous version, 2.3.1, there was no such a problem)  

If, e.g., you simply edit the command  

> histbackback(rnorm(20), rnorm(30))
 

a warning message is printed on the console.  

Warning messages:
1: argument 'probability' is not made use of in: hist.default(x, breaks = brks, plot = FALSE, probability = probability) 2: argument 'probability' is not made use of in: hist.default(y, breaks = brks, plot = FALSE, probability = probability)  

To fix this problem I simply REPLACE lines 26-27 of histbackback() code:  

ll <- hist(x, breaks = brks, plot = FALSE,probability=probability) rr <- hist(y, breaks = brks, plot = FALSE,probability=probability)  

with:  

ll <- hist(x, breaks = brks, plot = FALSE) rr <- hist(y, breaks = brks, plot = FALSE)  

The problem -- i guess -- is generated by the call to hist() which judges "incompatible" setting plot = FALSE and contemporarily specifying the probability argument. In fact, the description of plot argument in hist() function is as follows:  

plot logical. If TRUE (default), a histogram is plotted, otherwise a list of breaks and counts is returned. In the latter case, a warning is used if (typically graphical) arguments are specified that only apply to the plot = TRUE case.

Hence, another correction could be to REMOVE probability argument from the list of "(typically graphical)" arguments that only apply to the plot = TRUE case.

Then, it becomes a basic matter of R package.

Hope to be of some help and of course I would be very grateful ro receive any comment about.

Sincerely,

Matilde Trevisani



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Jan 17 01:11:56 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 16 Jan 2007 - 18:31:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.