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

Reply via email to