rows_l {tinylens}R Documentation

Rows lens

Description

This function returns a lens that selects the specified rows.

Usage

rows_l(idx)

Arguments

idx

The rows to select

Value

A lens that selects the specified rows

Examples

d <- data.frame(x = 1:10, y = 11:20, z = 21:30)
l <- rows_l(1:2)
# get the first two rows
view(d, l)
# set the first two rows
set(d, l, 1:2)

[Package tinylens version 0.1.0 Index]