[R] Rearranging columns with cbind

vin691 kjv at unh.edu
Thu Apr 21 22:23:06 CEST 2011


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"       
"FF_not_mC"         
 [5] "FF_promoter"        "FF_genebody"        "Leaf_not_mC"       
"Leaf_promoter"     
 [9] "Leaf_genebody"      "Root_not_mC"        "Root_promoter"     
"Root_genebody"     
[13] "Xylem_not_mC"       "Xylem_promoter"     "Xylem_genebody"    
"Phloem_not_mC"     
[17] "Phloem_promoter"    "Phloem_genebody"    "Fallbud_not_mC"    
"Fallbud_promoter"  
[21] "Fallbud_genebody"   "Winterbud_not_mC"   "Winterbud_promoter"
"Winterbud_genebody"
[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.



More information about the R-help mailing list