.BG M
.VE $Header: /usr3/s/current/s/data/.help/RCS/col,v 1.2 83/12/30 23:08:23 rab Exp $
.FN col
.TL
?col: Apply a Function to the Columns of a Matrix
.CS
?col(x, fun, arg1, ...)
.PP
.AG x
name of matrix.
Missing values (NAs) are allowed if `fun' accepts them.
.AG fun
(unquoted) name of function to be applied to the columns of
the matrix.
.AG argi
any other arguments that should be given to `fun'.
.RT
vector or matrix of results.  If each invocation of `fun'
produces a vector of length `n' (`n>1'), the result will be an
`n' by `ncol(x)' matrix.  Otherwise, the result will be a
vector of length `ncol(x)'.
.SH SEE ALSO
Function `apply'.
.EX
?col(y,median)    # column medians of matrix y
?col(y,mean,trim=.25)   #25% trimmed column means
.KW array*
.KW apply*
.WR
