Learn R Programming

tropAlgebra (version 0.1.1)

copyMatrix: Copy Matrices

Description

This function copies the first matrix in second one. Thhis fucntion will work only if both matrices are of same size.

Usage

copyMatrix(X,Y)

Arguments

X

A matrix to be copied.

Y

Target Matrix.

Value

Returns Y Matrix.

Details

If the size of source and target matrices are not same it generates an error.

Examples

Run this code
# NOT RUN {
X<-matrix(c('a','b','c','d'),nrow=2, ncol=2)
Y<-matrix(c(NA,NA,NA,NA),nrow=2, ncol=2)
copyMatrix(X,Y)
# }

Run the code above in your browser using DataLab