I have many numerical scalars/vectors, like:
a <- 1
b <- c(2,4)
c <- c(5,6,7)
d <- c(60, 556, 30, 4, 5556, 111232)
Now I need to add to every number in scalar/vector 1
and insert the result after that number. The solution should work with any numerical scalars and vectors. So result should look like:
a <- c(1,2)
b <- c(2,3,4,5)
c <- c(5,6,6,7,7,8)
d <- c(60, 61, 556, 557, 30, 31, 4, 5, 5556, 5557, 111232, 111233)
How this can be done?