[R] take component names of a list

2010-08-29 Thread Hyunchul Kim
Hi, all I want to take a vector of component names of a list. list.a - list('x'=1, 'y'=2) how to get a c('x','y') from list.a? Thanks in advance, Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] take component names of a list

2010-08-29 Thread Henrique Dallazuanna
Try this: names(list.a) On Sun, Aug 29, 2010 at 12:51 PM, Hyunchul Kim hyunchul.kim@gmail.comwrote: Hi, all I want to take a vector of component names of a list. list.a - list('x'=1, 'y'=2) how to get a c('x','y') from list.a? Thanks in advance, Hyunchul [[alternative

Re: [R] take component names of a list

2010-08-29 Thread Dimitris Rizopoulos
check at the online help file of function ?names(), and then try this: names(list.a) I hope it helps. Best, Dimitris On 8/29/2010 5:51 PM, Hyunchul Kim wrote: Hi, all I want to take a vector of component names of a list. list.a- list('x'=1, 'y'=2) how to get a c('x','y') from list.a?