Re: [Rd] Dispatch mechanism seems to alter object before calling method on it

2018-05-15 Thread Michael Lawrence
My understanding is that array (or any other structure) does not "simply" inherit from vector, because structures are not vectors in the strictest sense. Basically, once a vector gains attributes, it is a structure, not a vector. The methods package accommodates this by defining an "is" relationshi

[Rd] Dispatch mechanism seems to alter object before calling method on it

2018-05-15 Thread Hervé Pagès
Hi, This was quite unexpected: setGeneric("foo", function(x) standardGeneric("foo")) setMethod("foo", "vector", identity) foo(matrix(1:12, ncol=3)) # [1] 1 2 3 4 5 6 7 8 9 10 11 12 foo(array(1:24, 4:2)) # [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

[Rd] bug in {graphics} identify()

2018-05-15 Thread Richard Rowe
R3.4.x, R3.5.0, Windows7 64 bit code {graphics} identify() is sorting results before returning the vector. As documented it should return the raw sequence in the order selected ... "If |pos| is |FALSE|, an integer vector containing the indices of the identified points, in the order they were ide

[Rd] Mention L suffix in integer man page?

2018-05-15 Thread Thomas J. Leeper
This is just a suggestion for a documentation improvement. I went to `? integer` (src/library/base/man/integer.Rd) expecting to find an explanation of the L suffix described in: https://cran.r-project.org/doc/manuals/R-lang.html#Constants and `? NumericConstants` but it's not mentioned anywhere. It