jeudi 30 octobre 2014

Integers with zero prefix in R


Vote count:

0




I am trying generate a series of numbers with fixed length


I am using R 3.1.1 and this questions is NOT pertaining to any package.


I want serial numbers (integers) from 1 to (say) 1000. These are the positive continuous number. However, I want the numbers with prefix zeros, such that i get the output like below


0001 0002 0003 . . . . 0999 1000


That is nchar = 4 (always). can you please help me how to get such number sequence ?



asked 2 mins ago







Integers with zero prefix in R

Aucun commentaire:

Enregistrer un commentaire