Learn R Programming

lenses (version 0.0.3)

cols_l: Column lens

Description

Create a lens into a set of columns

Usage

cols_l(cols, drop = FALSE)

Arguments

cols

the columns to focus on

drop

whether or not to drop dimensions with length 1

Examples

Run this code
# NOT RUN {
x <- matrix(1:4, ncol = 2)
colnames(x) <- c("first", "second")
x

view(x, cols_l(1))
view(x, cols_l("second"))
set(x, cols_l(1), c(20,40))
# }

Run the code above in your browser using DataLab