lazyvec icon indicating copy to clipboard operation
lazyvec copied to clipboard

Allow attributes on a lazyvec

Open MarcusKlik opened this issue 6 years ago • 0 comments

Currently, setting an attribute to an ALTREP vector, triggers a copy and after that the vector is no longer an ALTREP:

x <- 1:10
lazyvec::is_altrep(x)
#> [1] TRUE

class(x) <- "my_class"
lazyvec::is_altrep(x)
#> [1] FALSE

Perhaps a custom lazyvec can store attributes inside the payload object.

MarcusKlik avatar Jun 30 '19 22:06 MarcusKlik