Learn R Programming

tropAlgebra (version 0.1.0)

vectorAdd: Addition of vectors: Tropical Algebra Function.

Description

This function add two vectors and returns the resultant vector Vectors length must be the equal.

Usage

vectorAdd(x,y)

Arguments

x

A numeric vector

y

A numeric vector

Value

Returns the tropical sum of x and y

Details

e.g. X<-c(5,6,7) Y<-c(1,2,3) Now function call: vectorAdd(X,Y) Then the sum is: [1] [2] [3] 1 2 3

Examples

Run this code
# NOT RUN {
x<-c(5,6,7)
y<-c(1,2,3)
  vectorAdd(x,y)
# }

Run the code above in your browser using DataLab