Description Usage Arguments Details Value Examples
This function swaps the values of both vectors. This function works only if both vectors have equal length.
1 | swapVector(x,y)
|
x |
A vector. |
y |
A vector. |
If the lengths of both vectors are not same, it generates an error. This function swaps the vectors in memory(like pass by reference), it does not return the vectors, but interchanges their values.
Swapped vectors x
and y
.
1 2 3 | x<-c(6,7,8)
y<-c(3,2,1)
swapVector(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.