Learn R Programming

lenses (version 0.0.3)

colnames_l: A lens into the column names of an object

Description

The lens version of colnames and colnames<-

Usage

colnames_l

Arguments

Format

An object of class lens of length 2.

Examples

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

view(x, colnames_l)
set(x, colnames_l, c("premiere", "deuxieme"))
# }

Run the code above in your browser using DataLab