triang: Upper triangular matrix from a vector

Description Usage Arguments Note Author(s) See Also Examples

Description

Creates an upper triangular square matrix from a vector.

Usage

1
triang( v, n )

Arguments

v

vector

n

desired dimension of the returned square matrix

Note

If the vector has less elements than the upper triangular matrix, the last elements are set to zero.

Author(s)

Arne Henningsen

See Also

veclipos.

Examples

1
2
   v <- c( 1:5 )
   triang( v, 3 )


Search within the miscTools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.