Learn R Programming

lenses (version 0.0.3)

dimnames_l: Dimnames lens

Description

A lens into the dimnames of an object. Lens equivalent of dimnames and dimnames<-.

Usage

dimnames_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, dimnames_l)
set(x, dimnames_l, list(NULL, c("premiere", "deuxieme")))
# }

Run the code above in your browser using DataLab