Dear all,

I would like to know how to merge columns like:

Input file:
  V1 V2 V3 V4 V5 V6
1  G  A  G  G  G  G
2  A  A  G  A  A  G

Desired output file:
    V1  V2   V3
1  G/A G/G G/G
2  A/A G/A A/G

So for every 2 consecutive columns merge their content into one.
Thanks in advance.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to