powered by
The lens equivalent of @ and @<- for getting and setting S4 object slots.
@
@<-
slot_l(slot)
the name of the slot
# NOT RUN { new_class <- setClass("new_class", slots = c(x = "numeric")) (x <- new_class()) view(x, slot_l("x")) set(x, slot_l("x"), 1:10) # }
Run the code above in your browser using DataLab