Learn R Programming

mark (version 0.8.1)

array_extract: Array extract

Description

Extract dimensions from an array

Usage

array_extract(.arr, ..., default = "1")

Value

A value from the array arr

Arguments

.arr

An array

...

A named list by array dimension number and the value

default

The default dimension index

Examples

Run this code
x <- array(rep(NA, 27), dim = c(3, 3, 3))
x[1, 2, 3] <- TRUE
x[1, 2, 3]
x
array_extract(x, `2` = 2, `3` = 3)

Run the code above in your browser using DataLab