[R] Rearranging columns with cbind

From: vin691 <kjv_at_unh.edu>
Date: Thu, 21 Apr 2011 13:23:06 -0700 (PDT)

I'm getting an error that I don't understand when trying to rearrange my data columns with cbind. My data is in 27 columns, like so:

> data <- read.table("CalledFeatsNimblegen.csv", header=T, sep=",") > names(data)

 [1] "MF_not_mC"          "MF_promoter"        "MF_genebody"       

[5] "FF_promoter" "FF_genebody" "Leaf_not_mC"
[9] "Leaf_genebody" "Root_not_mC" "Root_promoter"
[13] "Xylem_not_mC" "Xylem_promoter" "Xylem_genebody"

[17] "Phloem_promoter" "Phloem_genebody" "Fallbud_not_mC"

[21] "Fallbud_genebody" "Winterbud_not_mC" "Winterbud_promoter"

[25] "Springbud_not_mC" "Springbud_promoter" "Springbud_genebody"  

When I do this operation, I get the following "unused arguments" command: > dataSort <- cbind(data[19:27, 1:12, 13:15, 16:18], deparse.level=2) Error in `[.data.frame`(data, 19:27, 1:12, 13:15, 16:18) :   unused argument(s) (16:18)

Can anyone tell me why I'm getting this? When I apply the same command to different combinations of columns, or to 16:18 by itself, there is no problem.

View this message in context: http://r.789695.n4.nabble.com/Rearranging-columns-with-cbind-tp3466767p3466767.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
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:24:02 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