Learn R Programming

lenses (version 0.0.3)

attr_l: Construct a lens into an attribute

Description

The lens version of attr and attr<-

Usage

attr_l(attrib)

Arguments

attrib

A length one character vector indicating the attribute to lens into.

Examples

Run this code
# NOT RUN {
(x <- structure(1:10, important = "attribute"))
view(x, attr_l("important"))
set(x, attr_l("important"), "feature")
# }

Run the code above in your browser using DataLab