On Wed, May 16, 2018 at 3:45 PM, Hervé Pagès wrote:
> On 05/16/2018 01:24 PM, Michael Lawrence wrote:
>>
>> On Wed, May 16, 2018 at 12:23 PM, Hervé Pagès
>> wrote:
>>>
>>> On 05/16/2018 10:22 AM, Michael Lawrence wrote:
Factors and data.frames are not structures, because they must
On 05/16/2018 01:24 PM, Michael Lawrence wrote:
On Wed, May 16, 2018 at 12:23 PM, Hervé Pagès wrote:
On 05/16/2018 10:22 AM, Michael Lawrence wrote:
Factors and data.frames are not structures, because they must have a
class attribute. Just call them "objects". They are higher level than
struc
On Wed, May 16, 2018 at 12:23 PM, Hervé Pagès wrote:
> On 05/16/2018 10:22 AM, Michael Lawrence wrote:
>>
>> Factors and data.frames are not structures, because they must have a
>> class attribute. Just call them "objects". They are higher level than
>> structures, which in practice just shape dat
On 05/16/2018 10:22 AM, Michael Lawrence wrote:
Factors and data.frames are not structures, because they must have a
class attribute. Just call them "objects". They are higher level than
structures, which in practice just shape data without adding a lot of
semantics. Compare getClass("matrix") an
Factors and data.frames are not structures, because they must have a
class attribute. Just call them "objects". They are higher level than
structures, which in practice just shape data without adding a lot of
semantics. Compare getClass("matrix") and getClass("factor").
I agree that inheritance th
On 05/15/2018 09:13 PM, Michael Lawrence wrote:
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
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
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