The lens version of attr
and attr<-
attr_l(attrib)
attrib | A length one character vector indicating the attribute to lens into. |
---|
(x <- structure(1:10, important = "attribute"))#> [1] 1 2 3 4 5 6 7 8 9 10 #> attr(,"important") #> [1] "attribute"#> [1] "attribute"#> [1] 1 2 3 4 5 6 7 8 9 10 #> attr(,"important") #> [1] "feature"