Hello Your code gives a vector with length different to the original one -- View this message in context: http://r.789695.n4.nabble.com/adding-zeroes-after-old-zeroes-in-a-vector-tp2534824p2535017.html Sent from the R help mailing list archive at Nabble.com.