This function swaps the values of both vectors, Both Vectors must have equal length.
Usage
swapVector(x,y)
Arguments
x
A vector
y
A vector
Value
Returns the swapped vectors x and y
Details
e.g.
[1] [2] [3]
6 7 8 vector X
...................
[1] [2] [3]
3 2 1 vector Y
...................
Now function call:
swapVector(x,y)
Then swapped vectors are :
[1] [2] [3]
6 7 8 vector Y
...................
[1] [2] [3]
3 2 1 vector X