index: Get index an element of a matrix or array given by the point...

Description Usage Arguments Value See Also

View source: R/index.R

Description

This function is an inverse function to point().

Usage

1
2
3
4
5
6
7
8
9
index(m, point, ...)

## S3 method for class 'matrix'
index(m, point, ...)

## S3 method for class 'array'
index(m, point, ...)

is.index(m, i)

Arguments

m

A matrix or an array whose element index has to be computed

point

The coordinates of the element. For matrix, it should be a vector of two values (row, column). For array, three values have to be provided (row, column, layer).

Value

An integer value corresponding to the index of the element determined in point, if m was treated as a single-dimensional vector.

See Also

point()


beerda/hexmatrix documentation built on May 2, 2021, 4:15 a.m.