[R] Help reading table rows into lists

Alison Waller alison.waller at embl.de
Sun Oct 10 21:29:54 CEST 2010


Thanks Gabor and Jeffrey,

and thanks for explaining the differences.  I think I'll go with  
Jeffery's as I think I want entries for COGs with no pathway.

Alison
On 10-Oct-10, at 8:59 PM, Jeffrey Spies wrote:

> sapply(dat, function(x){
>    tmp<-unlist(strsplit(x, '\t', fixed=T))
>    out <- list(tmp[seq_along(tmp)[-1]])
>    names(out) <- tmp[1]
>    out
> }, USE.NAMES=F)



More information about the R-help mailing list