Re: [R] Rearranging columns with cbind

From: Cliff Clive <>
Date: Thu, 21 Apr 2011 13:44:12 -0700 (PDT)

It's just a typo.
You're missing a comma at the beginning of your index, and you should list all of the rows in a vector, like this:

data[, c(19:27, 1:12, 13:15, 16:18)]

The way you entered it, R is looking for rows 19:27, columns 1:12, and doesn't know what to do with the other numbers.

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 22 Apr 2011 - 02:23:09 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 Fri 22 Apr 2011 - 02:30:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive