dim_calc: Calculates multidimentsional index from linear

Description Usage Arguments Value Note Examples

View source: R/dimcalculations.R

Description

Calculates multidimentsional index from linear

Usage

1
dim_calc(wanted, diml)

Arguments

wanted

linear index

diml

vector of usually 3 dimensions describing dimension size

Value

vector of multidimensional index

Note

can work with arbritary dimensions, but typically uses three

this function does not check whether the final index is in range of the final dimension, it simply wraps around.

internally uses zero based index for calculation

Examples

1
2
3
4
5
6
7
8
## Not run: 
dim_calc(1, c(4, 3))
dim_calc(4, c(4, 3))
dim_calc(5, c(4, 3))
dim_calc(12, c(4, 3))
dim_calc(13, c(4, 3))

## End(Not run)

bdcaf/rawTof documentation built on July 17, 2019, 1:09 p.m.