nDiag2nTri: [+] Matrix: calculate number of elements in a lower/upper...

Description Usage Arguments Details Value Author(s) Examples

View source: R/nDiag2nTri.R

Description

Calculate a number of elements in a lower/upper triangle of a symmetric matrix of size n*n when n is given.

Usage

1

Arguments

n

A number of diagonal elements in a symmetric matrix.

Details

nCoeff = (n^2-n)/2, thus n = (1+sqrt(1+8*nCoeff))/2

Value

A number of elements in a lower/upper triangle of a matrix (excluding the diagonal).

Author(s)

Vilmantas Gegzna

Examples

1
2

GegznaV/spMisc documentation built on April 26, 2020, 5:59 p.m.