reshape_l: Lens into a new dimension(s)

Description Usage Arguments Examples

Description

Construct a lens that is a view of the data with a new set of dimensions. Both view and set check that the new dimensions match the number of elements of the data.

Usage

1
reshape_l(dims)

Arguments

dims

a vector with the new dimensions

Examples

1
2
3
x <- 1:9
view(x, reshape_l(c(3,3)))
set(x, reshape_l(c(3,3)) %.% diag_l, 100)

cfhammill/fresnel documentation built on May 15, 2019, 1:13 p.m.