Learn R Programming

swfscMisc (version 1.6.5)

copy.tri: Copy Matrix Triangles

Description

Copy between lower left and upper right triangles of a matrix.

Usage

copy.tri(x, from = "lower")

Value

a matrix.

Arguments

x

a matrix.

from

triangle to copy from. Can be "lower" or "upper".

Author

Eric Archer eric.archer@noaa.gov

Examples

Run this code
x <- matrix(1:9, nrow = 3)
print(x)
copy.tri(x)

Run the code above in your browser using DataLab