On Mon, Jun 2, 2008 at 11:59 AM, Blubbele <[EMAIL PROTECTED]> wrote: > > Thanks but it swaps in both cases only the data: > > FemMal_88[c(61,62)]=FemMal_88[c(62,61)] > > > FemMal_88[,c(61,62)]=FemMal_88[,c(62,61)]
The following works: d <- data.frame(a=c(1,2),b=c(3,4)) d <- d[,c(2,1)] Paul ______________________________________________ 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.