0

I have a vector, say vec = c(1,3,2). I want to insert a value, e.g., -1, after each of the value, so that to get c(1,-1,3,-1,2,-1). How to achieve that with some simple function?

yliueagle
  • 1,191
  • 1
  • 7
  • 22

0 Answers0