Re: [R] Rearranging columns with cbind

From: Cliff Clive <cliffclive_at_gmail.com>
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: http://r.789695.n4.nabble.com/Rearranging-columns-with-cbind-tp3466767p3466804.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive