Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

entry.value

Retrieve or set a list of array element values


Description

entry.value retrieves or sets the values in an array a at the positions indicated by the rows of a matrix idx.

Usage

entry.value(a, idx)

Arguments

a

An array.

idx

Numerical matrix with the same number of columns as the number of dimensions of a. Each row indices a cell in a of which the value is to be retrieved or set.

value

An array of length nrow(idx).

Value

entry.value(a,idx) returns a vector of values at the indicated cells. entry.value(a,idx) <- val changes the indicated cells of a to val.

Author(s)

Raoul Grasman

Examples

a = array(1:(4^4),c(4,4,4,4))
entry.value(a,cbind(1:4,1:4,1:4,1:4))
entry.value(a,cbind(1:4,1:4,1:4,1:4)) <- 0

entry.value(a, as.matrix(expand.grid(1:4,1:4,1:4,1:4)))
     # same as `c(a[1:4,1:4,1:4,1:4])' which is same as `c(a)'

geometry

Mesh Generation and Surface Tessellation

v0.4.5
GPL (>= 3)
Authors
Jean-Romain Roussel [cph, ctb] (wrote tsearch function with QuadTrees), C. B. Barber [cph], Kai Habel [cph, aut], Raoul Grasman [cph, aut], Robert B. Gramacy [cph, aut], Pavlo Mozharovskyi [cph, aut], David C. Sterratt [cph, aut, cre] (<https://orcid.org/0000-0001-9092-9099>)
Initial release
2019-12-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.