Skip to content
Prev 261817 / 398503 Next

RES: RES: Recode numbers

Many thanks for this clever solution, it is much more elegant and efficient indeed. Cheers!

-----Mensagem original-----
De: Petr PIKAL [mailto:petr.pikal at precheza.cz] 
Enviada em: sexta-feira, 3 de junho de 2011 09:37
Para: Filipe Leme Botelho
Cc: Lisa; r-help at r-project.org
Assunto: Odp: [R] RES: Recode numbers

Hi

r-help-bounces at r-project.org napsal dne 01.06.2011 21:10:23:
a bit shorter is

a2<-rep(b, rle(a)$lengths)

Regards
Petr

            
http://www.R-project.org/posting-guide.html
"This message and its attachments may contain confidential and/or privileged information. If you are not the addressee, please, advise the sender immediately by replying to the e-mail and delete this message."

"Este mensaje y sus anexos pueden contener informaci?n confidencial o privilegiada. Si ha recibido este e-mail por error por favor b?rrelo y env?e un mensaje al remitente."

"Esta mensagem e seus anexos podem conter informa??o confidencial ou privilegiada. Caso n?o seja o destinat?rio, solicitamos a imediata notifica??o ao remetente e exclus?o da mensagem."
Message-ID: <07E17EE73DE13B4897BC6FE325CF7A24013E27E4@BRSAOWSEXCL001.votorantim.grupo>
In-Reply-To: <OF1E39D9B7.7F5C4220-ONC12578A4.00453465-C12578A4.004554FE@precheza.cz>