Write a R program to reverse the order of given vector.
v = c(0, 10, 10, 10, 20, 30, 40, 40, 40, 50, 60) print("Original vector-1:") print(v) rv = rev(v) print("The said vector in reverse order:") print(rv)
Sample Output:
[1] "Original vector-1:" [1] 0 10 10 10 20 30 40 40 40 50 60 [1] "The said vector in reverse order:" [1] 60 50 40 40 40 30 20 10 10 10 0
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer