Bug 14341 - hist.Date warnings when setting pars ylab, main, etc...
hist.Date warnings when setting pars ylab, main, etc...
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Graphics
R 2.11.1
ix86 (32-bit) Windows 32-bit
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 13:55 UTC by Richard Chandler
Modified: 2010-07-21 15:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Chandler 2010-07-21 13:55:35 UTC
hist.Date gives incorrect warnings when setting some graphical parameters. Here is an example:

x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")

hist(x, breaks="days", main="")
hist(x, breaks="days", ylab="")
Comment 1 Peter Dalgaard 2010-07-21 14:30:55 UTC
Well, the warning is correct enough: hist.default does indeed not make use of main and ylab when called with plot=FALSE.  The problem is that it is called with ..., a generic problem when ... has arguments for more than one subordinate function.
Comment 2 Duncan Murdoch 2010-07-21 15:27:05 UTC
Fixed in R-devel by adding a new parameter to hist.default() to suppress the warnings.  Methods should now add "warn.unused=FALSE" to calls to hist.default() if they're passing the ... args along.  Will commit after testing...
Comment 3 Duncan Murdoch 2010-07-21 18:35:41 UTC
On 21/07/2010 9:30 AM, r-bugs@r-project.org wrote:
> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14341
>
>
> Peter Dalgaard <pd.mes@cbs.dk> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |pd.mes@cbs.dk
>
>
>
>
> --- Comment #1 from Peter Dalgaard <pd.mes@cbs.dk>  2010-07-21 09:30:55 ---
> Well, the warning is correct enough: hist.default does indeed not make use of
> main and ylab when called with plot=FALSE.  The problem is that it is called
> with ..., a generic problem when ... has arguments for more than one
> subordinate function.
>
>   

But it is fixable:  I'll put in a patch.

Duncan Murdoch