[R] repeating values in an index two by two

Federico Calboli f.calboli at imperial.ac.uk
Mon Nov 11 13:11:48 CET 2013


Hi All,

I am trying to create an index that returns something like

1,2,1,2,3,4,3,4,5,6,5,6,7,8,7,8

and so on and so forth until a predetermined value (which is obviously even).  I am trying very hard to avoid for loops or for loops front ends.

I'd be obliged if anybody could offer a suggestion.

BW

F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131111/7bc5cbcb/attachment.bin>


More information about the R-help mailing list