Learn R Programming

lenses (version 0.0.3)

indexes_l: Construct a lens into a subset of an object

Description

This is the lens version of [

Usage

indexes_l(els)

indexes(els)

Arguments

els

a subset vector, can be integer, character of logical, pointing to one or more elements of the object

Functions

  • indexes: shorthand

Examples

Run this code
# NOT RUN {
x <- 1:10
view(x, indexes_l(3:5))
set(x, indexes_l(c(1,10)), NA)
head(view(iris, indexes_l(c("Sepal.Length", "Species"))))
# }

Run the code above in your browser using DataLab