copyMatrix {tropAlgebra}R Documentation

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.

Details

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

Value

Returns Y Matrix.

Examples

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)

[Package tropAlgebra version 0.1.1 Index]