[R] cbind question

Han, Hillary Hillary_Han at brown.edu
Sat Mar 27 21:16:44 CET 2004


hi, all:

Just wonder if there is any suggestions in how to get around this cbind error. I created two character lists with identical length. First tried combine the lists together with cbind, then convert the lists to matrix, and tried again. Both faied. Any fix to merge the two lists/matrices?


ll<- multiget(ftID, hgu95av2LOCUSID)
> class(ll)
[1] "list"
> sym <- multiget(ftID, hgu95av2SYMBOL)
> class(sym)
[1] "list"
> cbind(sym, ll)
Error in cbind(...) : cannot create a matrix from these types
> sym <- as.matrix(multiget(ftID, hgu95av2SYMBOL))
> ll<- as.matrix(multiget(ftID, hgu95av2LOCUSID))
> dim(sym)
[1] 508   1
> dim(ll)
[1] 508   1
> class(sym)
[1] "matrix"
> class(ll)
[1] "matrix"
> cbind(sym,ll)
Error in cbind(...) : cannot create a matrix from these types

thanks, 
Hillary




More information about the R-help mailing list