From vitosmail at rambler.ru  Fri Aug 28 16:07:31 2009
From: vitosmail at rambler.ru (Vitalie S.)
Date: Fri, 28 Aug 2009 16:07:31 +0200
Subject: [Rd] S4: names stripped during instantiation of grandchildren of
 numeric class
Message-ID: <op.uzdlitwzdacko8@tir-070312.staff.few.eur.nl>


Dear All,

A small inconsistency (it's probably not even a buglet):


> setClass("A", contains="numeric")
[1] "A"
> names(new("A", c(a=23)))
[1] "a"

> setClass("B", contains="A")
[1] "B"
> names(new("B", c(a=23)))
NULL
>

This is exactly that kind of behavior S4 was invented for, you expect  
names to be there, but they are not :(.

If that behavior is left to be, one would have to implement @names  
manually for children of basic pseudo-classes, which is quite an overhead  
given the functionality is already in base R.

Thanks,
Vitalie.



[Rd] S4: names stripped during instantiation of grandchildren of numeric class
Vitalie S.