> fourseq <- sprintf("%04d", 1:3000) > head(fourseq) [1] "0001" "0002" "0003" "0004" "0005" "0006" > tail(fourseq) [1] "2995" "2996" "2997" "2998" "2999" "3000"
Note that it has to be character to maintain the initial zeroes. Sarah On Mon, Feb 29, 2016 at 3:12 PM, Cacique Samurai <caciquesamu...@gmail.com> wrote: > Hello Helpers! > > How to create a number sequence from1 to 3000, but usigm four numbers > like 0001, 0002...0102...3000. > > Thanks in advanced, > > Raoni > ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.