On 17/11/2014, 4:23 PM, Murat Tasan wrote:
> Yeah, my biggest stumbling-point while starting to write S3 classes
> was the some-default-methods-preserve class, and
> some-default-methods-don't-preserve class dichotomy.
> But I'm not sure it's so "easy" to figure this out without more
> documentatio
On 17/11/2014 10:41 AM, Hadley Wickham wrote:
> Generally the idea is that the class should be stripped because R has no
> way of knowing if the new object, for example unique(obj), still has the
> necessary properties to be considered to be of the same class as obj.
> Only the author of the clas
> Generally the idea is that the class should be stripped because R has no
> way of knowing if the new object, for example unique(obj), still has the
> necessary properties to be considered to be of the same class as obj.
> Only the author of the class knows that. S4 would help a bit here, but
> o
On 16/11/2014, 7:58 PM, Murat Tasan wrote:
> Hi all --- this is less a specific question and more general regarding
> S3 classes.
> I've noticed that quite a few very common default implementations of
> generic functions (e.g. `unique`, `[`, `as.data.frame`) strip away
> class information.
> In som
Hi all --- this is less a specific question and more general regarding
S3 classes.
I've noticed that quite a few very common default implementations of
generic functions (e.g. `unique`, `[`, `as.data.frame`) strip away
class information.
In some cases, it appears conditionals have been created to r