attr_l {lenses}R Documentation

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

(x <- structure(1:10, important = "attribute"))
view(x, attr_l("important"))
set(x, attr_l("important"), "feature")

[Package lenses version 0.0.3 Index]