index_l {lenses}R Documentation

Construct a lens into an index/name

Description

This is the lens version of [[

Usage

index_l(el)

index(el)

Arguments

el

The element the lens should point to can be an integer or name.

Functions

Examples

x <- 1:10
view(x, index_l(1))
set(x, index(5), 50)
head(view(iris, index(2)))

[Package lenses version 0.0.3 Index]