Displaying 1 result from an estimated 1 matches for "i_turned".
2008 Jul 10
4
Turn any vector
Dear R-users,
I'd like to turn a vector so it starts with it's end. For better
understanding, this set of commands will do what I need:
i <- seq(1:10)
i_turned <- i
for (j in 1:length(i)) i_turned[j] <- i[length(i)-j+1]
now, i_turned is what I call turned. Is there a function which would make a
script lighter? Thank you upfront for any hint.
Best regards,
Zroutik
[[alternative HTML version deleted]]