slot_l: Slot lens

Description Usage Arguments Examples

Description

The lens equivalent of @ and @<- for getting and setting S4 object slots.

Usage

1

Arguments

slot

the name of the slot

Examples

1
2
3
4
5
new_class <- setClass("new_class", slots = c(x = "numeric"))
(x <- new_class())

view(x, slot_l("x"))
set(x, slot_l("x"), 1:10)

cfhammill/fresnel documentation built on May 15, 2019, 1:13 p.m.