Learn R Programming

NMsim (version 0.2.6)

triagSize: Calculate number of elements for matrix specification

Description

calculate number of elements in the diagonal and lower triangle of a squared matrix, based on the length of the diagonal.

Usage

triagSize(diagSize)

Value

An integer

Arguments

diagSize

The length of the diagonal. Same as number of rows or columns.

Examples

Run this code
NMsim:::triagSize(1:5)

Run the code above in your browser using DataLab