Re: [R] inserting columns in the middle of a dataframe

From: Jon Minton <jm540_at_york.ac.uk>
Date: Wed 13 Sep 2006 - 21:13:47 GMT


Dear R users:  

Is there a built-in and simple way to insert new columns after other columns in a dataframe?  

I.e. currently I have:  

V1 V2 V3 V4

[1,]

[2,]

Etc.  

But I want

                V1 V5 V2 V3 V4

[1,]

[2,]

Etc.  

Can this be done in one line?  

Jon Minton    

        [[alternative HTML version deleted]]



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 Thu Sep 14 07:43:21 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 13 Sep 2006 - 22:30:06 GMT.

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