Dear R users,

I have a list that I'd like to convert to a vector while preserving the 
original names.
For example:

test <- list(ABCC2=37280,ABCC5=c(12268,13308));

If I do unlist, it automatically renamed the ABCC5 to ABCC51 and ABCC52
> unlist(test)
 ABCC2 ABCC51 ABCC52 
 37280  12268  13308 

How do I retained the original names so I'll get:
ABCC2 37280
ABCC5 12268
ABCC5 13308

Thank you in advance for your help.

Lin                                       
______________________________________________
R-help@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.

Reply via email to