[R] collating columns

From: Matthew Scholz <schmatthew_at_gmail.com>
Date: Tue 31 Jan 2006 - 08:09:49 EST

Dumb newbie question: I've searched the manual, R help and the mailing list archives, but can't seem to find the answer to this simple problem that I have. If I have a series of columns in a dataframe: (A, B, C ...) and I want to merge them with another series of columns (Z,Y,X ...) such that the resulting data frame has columns A,Z,B,Y,C,X ..., how do I do this? In other words, I'm trying to collate two column sets (for purposes of writing a presentable file) rather than simply using cbind to add one set of columns onto the end of another set.

Thanks in advance of your help.


Matt Scholz
Senior Research Specialist
Department of Plant Sciences
University of Arizona
(520) 621-1695

	[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jan 31 08:31:21 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:15 EST