On Mon, Jun 2, 2008 at 11:59 AM, Blubbele <birgit.lemcke at systbot.uzh.ch> 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