Command Reference
:
Function Reference
:
Function Reference: C
@cfirst
Matrix Column Statistics
First non-missing value in each column of a matrix object.
Syntax:
@cfirst
(
m
)
m
: matrix
Return: vector
Returns a vector containing the first non-missing value from each column of the matrix
m
.
Examples
Let M1 be an
lower triangular matrix whose
elements above the main diagonal are NAs. In this case,
= @cfirst(m1)
returns the main diagonal of M1 as a column vector.
Cross-references
See also
@clast
,
@cifirst
, and
@cilast
.
See also
@first
,
@last
,
@ifirst
, and
@ilast
.