[R] Data transformation

From: jenny tan <jennytimp_at_hotmail.com>
Date: Wed 02 Aug 2006 - 12:46:29 EST


Hi there,

Wonder if someone who is R-savvy can help me with the following task (see below) that I occasionally do work and gets quite tedious if I do it manually. Thanks in advance!

jenny.


I have a column of data that looks like this: NA18501
NA18502
NA18504
NA18505
NA18507
NA18508
NA18516
NA18517
NA18522
NA18523

And I want to duplicate the values and sort of "interweave" them to look like this:

NA18501
NA18501
NA18502
NA18502
NA18504
NA18504
NA18505
NA18505
NA18507
NA18507

NA18508
NA18508
NA18516
NA18516
NA18517
NA18517
NA18522
NA18522
NA18523
NA18523



R-help@stat.math.ethz.ch mailing list
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. Received on Wed Aug 02 12:52:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 02 Aug 2006 - 14:20:17 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.