attr_l {tinylens}R Documentation

Attributes lens

Description

Lens into a named attribute of an object.

Usage

attr_l(name)

Arguments

name

Name of the attribute to lens into

Value

A lens that selects the specified attribute

Examples

x <- 1:10
attr(x, "label") <- "my_label"
l <- attr_l("label")
view(x, l)
set(x, l, "new_label")

[Package tinylens version 0.1.0 Index]