Skip to content

Re-arrange Columns in data frame

3 messages · Jabez Wilson, Gabor Grothendieck

#
Try this:

# first case
ix <- c(matrix(1:24, 4, byrow = TRUE))
DF[ix]

# second case
ix <- c(matrix(1:16, 4, byrow = TRUE))
DF[ix]
On Wed, Nov 25, 2009 at 11:16 AM, Jabez Wilson <jabezwuk at yahoo.co.uk> wrote: