Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-29 Thread Martin Maechler
> Spencer Graves > on Tue, 28 Jan 2020 17:24:14 -0600 writes: > On 2020-01-28 05:13, Martin Maechler wrote: >>> Spencer Graves >>> on Mon, 27 Jan 2020 23:02:28 -0600 writes: > >> >> Still, as Abby mentioned, turning a simple function into the >>

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-28 Thread Spencer Graves
On 2020-01-28 05:13, Martin Maechler wrote: Spencer Graves on Mon, 27 Jan 2020 23:02:28 -0600 writes: Still, as Abby mentioned, turning a simple function into the default method of an S3 generic is easy to do, but comes with a bit of cost, not just S3 dispatch which typically is neg

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-28 Thread Martin Maechler
> Spencer Graves > on Mon, 27 Jan 2020 23:02:28 -0600 writes: >   Thanks for the reply. > On 2020-01-27 19:56, Abby Spurdle wrote: >> Maybe I'm missing something really obvious here, but I was unable to >> create a matrix out of POSIXct object(s). >> Perhaps th

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-28 Thread Edzer Pebesma
Whether something "is" a matrix depends on whether you listen to is.matrix(x) or to inherits(x, "matrix"): x = Sys.Date () + 1:16 y = as.POSIXct (x) dim(y) = c(4,4) is.matrix(y) # [1] TRUE inherits(y, "matrix") # [1] FALSE f = factor(letters[1:9]) dim(f) = c(3,3) is.matrix(f) # [1] TRUE inherits(

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-28 Thread Abby Spurdle
> > Maybe I'm missing something really obvious here, but I was unable to > > create a matrix out of POSIXct object(s). > > Perhaps that deserves a separate discussion...? >Can you provide an example? -- #date and time objects x = Sys.Date () + 1:16 y = as.POSIXct (x) #matrices str (matrix

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-27 Thread Spencer Graves
  Thanks for the reply. On 2020-01-27 19:56, Abby Spurdle wrote: Maybe I'm missing something really obvious here, but I was unable to create a matrix out of POSIXct object(s). Perhaps that deserves a separate discussion...?   Can you provide an example?   The standard matplot a

Re: [Rd] matplot.Date & matplot.POSIXct

2020-01-27 Thread Abby Spurdle
Maybe I'm missing something really obvious here, but I was unable to create a matrix out of POSIXct object(s). Perhaps that deserves a separate discussion...? Regarding your other comments/questions: (1) You should *NOT* mask functions from the graphics package (or base, stats, etc), except possib

[Rd] matplot.Date & matplot.POSIXct

2020-01-24 Thread Spencer Graves
Hello, All:   Roughly a decade ago, I added "matplot.Date" and "matplot.POSIXct" to the "fda" package, so we could get reasonable labeling of the horizontal axis when "x" was class "Date" or "POSIXct".  I also added a local version of "matplot.default" that just changes the defaults fo