[Rd] plot with Julian date (PR#9145)

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Aug 16 10:27:04 CEST 2006


You are using the plot method for class "date" from contributed package 
'survival', so it was incorrect to post this as a bug report on R itself.
See

> args(survival:::plot.date)
function (x, y, ..., axes, xaxt, xlab, ylab, log = NULL, xlim = range(x, 
    na.rm = TRUE), ylim = range(y, na.rm = TRUE)) 
NULL

which defaults 'log' to the invalid value of NULL.

Similarly, the warning comes from passing the non-graphics-parameter 
'type' to axis() inside that function.

Please take this up with the package maintainer (as the posting guide and 
FAQ ask).

[You did not get a reply on R-help, at least from me, because you ignored 
the advice to contact the package maintainer.]


On Mon, 14 Aug 2006, cspark at ces.clemson.edu wrote:

> Full_Name: Chanseok Park
> Version: 2.3.1
> OS: RHEL
> Submission from: (NULL) (130.127.112.89)
> 
> 
> Dear Sir/Madam:
> 
> I wrote some examples below. 
> The plot() function is not working properly with Julian date. 
> For example, log="" should be a default option, but without the repetition of
> this default option in plot(), we can not draw it especially with Julian date. 
> So, maybe, the plot() function might not be compatible with as.date(). 
> 
> Thanks,
> C. Park
> 
> ##############################################
> library(survival)
> 
> dat=c("12-5-1995", "12-30-1995", "8-27-1996", "11-20-1996", "8-29-1997" )
> 
> miles = c(106, 1468, 7298, 7935, 13440 )
> 
> jdat = as.date(dat)
> 
>  plot( jdat, miles )   ## Not working
> 
>  plot( jdat, miles, log="" )  ## Works
> 
>  plot( jdat, miles, type="l") ## Not working
> 
>  plot( jdat, miles, log="", type="l") ## works with WARNING
> 
> ##===========================
> ## Let's use as.Date() and as.date().
> jdat = as.Date( as.date(dat) )
> 
>  plot( jdat, miles )          ## Works
>  plot( jdat, miles, log="" )  ## Works
>  plot( jdat, miles, type="l") ## WOrks
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list