Yes, I noticed after I had sent it that x was said to be numeric. Incidentally, this does not happen, in my experience, with Date objects.
John Maindonald email: [EMAIL PROTECTED] 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. On 27 Oct 2007, at 5:48 PM, Duncan Murdoch wrote: > On 27/10/2007 3:10 AM, [EMAIL PROTECTED] 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: [EMAIL PROTECTED] >> 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@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel