Skip to content
Prev 57666 / 63421 Next

Puzzled about a new method for "[".

For what it's worth, I don't think this strategy can work in general,
because a class might have attributes that depend on its data/contents
(e.g. https://vctrs.r-lib.org/articles/s3-vector.html#cached-sum). I
don't think these are particularly common in practice, but it's
dangerous to assume that you can restore a class simply by restoring
its attributes after subsetting.

Hadley
On Sun, Nov 3, 2019 at 3:11 PM Rolf Turner <r.turner at auckland.ac.nz> wrote: