Description Usage Arguments Details Value Author(s) Examples
View source: R/ListPosition2ListCoordinates.R
Gives the exact position of the kth item in a list comprised of vectors.
1 | ListPosition2ListCoordinates(Position, ListDimensions)
|
Position |
The kth value for which the position is desired. |
ListDimensions |
The dimensions (vector length) of each part of the list in order. |
The R language has a great variety of ways that data can be stored, but sometimes it can be hard to isolate the required information. For example, imagine you store data in a list composed of vectors of length 1, 3, 2, 6, 1, and 3, but you just want to know where you will find the 13th value. This function will give "coordinates" for that value corresponding to the list number (5 in the example) and vector position in that list (1 in the example).
The position, in terms of both list number ($ListNumber) and list position ($ListPosition), of the kth value.
Graeme T. Lloyd graemetlloyd@gmail.com
1 2 | # Find the position of the 13th value:.
ListPosition2ListCoordinates(13, c(1, 3, 2, 6, 1, 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.