lazyvec
lazyvec copied to clipboard
Allow attributes on a lazyvec
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.