Answers for "r reverse vector"

R
0

r reverse vector

# Reverse vector elements
rev(vec)

# Example:
vec <- c(1, 2, 3, 4)
rev(vec)
>> 4, 3, 2, 1
Posted by: Guest on September-09-2021

Browse Popular Code Answers by Language