From murdoch at stats.uwo.ca  Sat Oct 27 09:48:06 2007
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sat, 27 Oct 2007 03:48:06 -0400
Subject: [Rd] Unwanted axis labels when rug() has POSIXlt argument
	(PR#10380)
In-Reply-To: <20071027071022.79EF72834619@mail.pubhealth.ku.dk>
References: <20071027071022.79EF72834619@mail.pubhealth.ku.dk>
Message-ID: <4722ED36.3080400@stats.uwo.ca>

On 27/10/2007 3:10 AM, John.Maindonald at anu.edu.au wrote:
> rug() may add integer axis labels when called with a POSIXlt object
> as argument.
> 
> dtimes <- c("09/29/2007  12:54", "09/30/2007  00:14", "10/01/2007   
> 00:14",
>                "10/02/2007  00:14", "10/03/2007  00:14", "10/04/2007   
> 00:14",
>                "10/05/2007  00:14", "10/06/2007  00:14", "10/07/2007   
> 00:14",
>                "10/08/2007  00:14")
> z <- strptime(dtimes, "%m/%d/%Y %H:%M", tz="EST5EDT")
> plot(z, rnorm(10))
> rug(z)
> 
> This happens also undo Windows, both with 2.6.0 and 2.7.0 (2007-10-26  
> r43284)

rug() is documented to require a numeric vector as input, and z isn't 
one of those, so there's an argument that this is user error.  Still, 
its behaviour is a little surprising.

The workaround is to use rug(as.numeric(z)).

Duncan Murdoch

> 
> --please do not edit the information below--
> 
> Version:
> platform = i386-apple-darwin8.10.1
> arch = i386
> os = darwin8.10.1
> system = i386, darwin8.10.1
> status =
> major = 2
> minor = 6.0
> year = 2007
> month = 10
> day = 03
> svn rev = 43063
> language = R
> version.string = R version 2.6.0 (2007-10-03)
> 
> Locale:
> C
> 
> Search Path:
> .GlobalEnv, package:stats, package:graphics, package:grDevices,  
> package:utils, package:datasets, package:methods, Autoloads,  
> package:base
> 
> John Maindonald             email: john.maindonald at anu.edu.au
> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
> Centre for Mathematics & Its Applications, Room 1194,
> John Dedman Mathematical Sciences Building (Building 27)
> Australian National University, Canberra ACT 0200.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Unwanted axis labels when rug() has POSIXlt argument (PR#10380)
Duncan Murdoch