[Rd] axis.Date problem, bug(?)

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Apr 6 19:39:01 CEST 2005


Gavin Simpson wrote:
> Dear List,
> 
> I have the following problem with axis.Date, here is an artificial example:
> 
> dates <- scan(what = "character")
> "25/03/2000" "26/03/2000" "27/03/2000" "28/03/2000" "29/03/2000" 
> "30/03/2000" "31/03/2000" "01/04/2000" "02/04/2000" "03/04/2000" 
> "04/04/2000" "05/04/2000"
> 
> dates <- as.Date(as.character(dates), format = "%d/%m/%Y")
> vals <- rnorm(12)
> plot(x = dates, y = vals, axes = FALSE)
> axis(side = 2)
> box()
> axis.Date(side = 1, x = dates, labels = "")
> Error in axis(side, at = z, labels = labels, ...) :
>         formal argument "labels" matched by multiple actual arguments
> 
> Which arises because axis.Date has this in the function:
> axis.Date
> function (side, x, at, format, ...)
> {
>     ...
>     labels <- format.Date(z, format = format)
>     axis(side, at = z, labels = labels, ...)
>     invisible()
> }
> 

Sorry, forgot the all important:

version
          _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status   beta
major    2
minor    1.0
year     2005
month    04
day      06
language R

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-devel mailing list