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.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to