[R] Using a number as a name to access a list

2005-02-10 Thread michael watson \(IAH-C\)
Hi Dumb question time again, for which I apologise. I have a variable that contains the following numerical text 04010. This is the name to access a list: as.list(KEGGPATHID2NAME)$04010 [1] MAPK signaling pathway Marvellous! Except I want to do that when 04010 is assigned to a variable

Re: [R] Using a number as a name to access a list

2005-02-10 Thread Dimitris Rizopoulos
lists are like vectors, i.e., x - c(a = 1, b = 2) path - b x[path] the same applies to lists: lis - list(a = 1:3) path - a lis[path] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

Re: [R] Using a number as a name to access a list

2005-02-10 Thread Jan T. Kim
On Thu, Feb 10, 2005 at 01:35:56PM -, michael watson (IAH-C) wrote: I have a variable that contains the following numerical text 04010. This is the name to access a list: as.list(KEGGPATHID2NAME)$04010 [1] MAPK signaling pathway Marvellous! Except I want to do that when 04010 is