a = c(0, 1, 2, 3, 4, 5, 6)a[seq(6, 1, -2)] = c("a", "b", "c")print(a)
Standard input is empty
[1] "0" "c" "2" "b" "4" "a" "6"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!