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

veclipos

Position in a vector of linear independent values


Description

Returns the position of the [i,j]th element of a symmetric n x n matrix that this element has in a vector of the linear independent values of the matrix.

Usage

veclipos( i, j, n )

Arguments

i

row of the element in the matrix.

j

column of the element in the matrix.

n

dimension of the matrix.

Note

A symmetric n x n matrix has n*(n+1)/2 independent values.
The function is: n*(n-1)/2-((n-min(i,j))*(n-min(i,j)+1)/2)+max(i,j)

Author(s)

Arne Henningsen

See Also

Examples

veclipos( 1, 2, 3 )  # returns: 2

miscTools

Miscellaneous Tools and Utilities

v0.6-26
GPL (>= 2)
Authors
Arne Henningsen, Ott Toomet
Initial release
2019-12-08

We don't support your browser anymore

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