[R] Swap variables in data.frame

From: Birgit Lemcke <birgit.lemcke_at_systbot.uzh.ch>
Date: Mon, 02 Jun 2008 11:27:18 +0200

Hello R-user community!

I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner)

I have a problem that is certainly solved very easily but presently I don`t know how.

I have a dataframe and two of my variables are in the wrong position and I would like to swap those variables. It is easier to handle the dataset if the variables have a certain order.

I will be grateful for a hint to solve this.



Birgit Lemcke
Institut für Systematische Botanik
Zollikerstrasse 107
CH-8008 Zürich
Ph: +41 (0)44 634 8351

175 Jahre UZH
«staunen.erleben.begreifen. Naturwissenschaft zum Anfassen.» Weitere Informationen http://www.175jahre.uzh.ch/naturwissenschaft

R-help_at_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. Received on Mon 02 Jun 2008 - 09:41:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 03 Jun 2008 - 15:00:37 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.

list of date sections of archive