, 2016 3:12 PM
To: R help
Subject: [R] Special sequence
Hello Helpers!
How to create a number sequence from1 to 3000, but usigm four numbers like
0001, 0002...0102...3000.
Thanks in advanced,
Raoni
--
Raoni Rosa Rodrigues
Research Associate of Fish Transposition Center CTPeixes Universidade
> 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
wrote:
> Hello
Hello Helpers!
How to create a number sequence from1 to 3000, but usigm four numbers
like 0001, 0002...0102...3000.
Thanks in advanced,
Raoni
--
Raoni Rosa Rodrigues
Research Associate of Fish Transposition Center CTPeixes
Universidade Federal de Minas Gerais - UFMG
Brasil
rodrigues.ra...@gmai
3 matches
Mail list logo