getIndex: Extract or Set Slice Index

Description Usage Arguments Value Examples

View source: R/attributes.R

Description

Functions to obtain or set the index to which a slice object points.

Usage

1
2
3

Arguments

x

object of class "slice"

...

objects compatible with extracting or replacing a vector

Value

object of class "slice"

Examples

1
2
3
4
5
6
x <- matrix(1:9, nrow=3)
slice_x <- slice(x, 2:3, 1)
identical(getIndex(slice_x), list(2:3, 1)) # TRUE

setIndex(slice_x, list(1, substitute()))
identical(!slice_x, c(1, 4, 7))    # TRUE

refer documentation built on Nov. 8, 2021, 5:08 p.m.