[BioC] R question on symbolic variables

axel.klenk at actelion.com axel.klenk at actelion.com
Thu Jan 14 10:40:35 CET 2010

Dear Chris,

the latter. I think you want:

a <- list(hello = c(1,2,3), goodbye = c(1,2,3))
b <- "hello"

Note the difference between extracting a sublist
using '[' and a list element using '[[' and see:



 - axel

Axel Klenk
Research Informatician
Actelion Pharmaceuticals Ltd / Gewerbestrasse 16 / CH-4123 Allschwil /

             Chris Fenton                                                  
             <chrisf at fagmed.ui                                             
             t.no>                                                      To 
             Sent by:                  bioconductor                        
             bioconductor-boun         <bioconductor at stat.math.ethz.ch>    
             ces at stat.math.eth                                          cc 
                                       [BioC] R question on symbolic       
             01/14/2010 09:54          variables                           

Is this a limitation in the R language or am I missing something
fundamental (like an operator)

> a <- list("hello"<-c(1,2,3), "goodbye"<-c(1,2,3))
> a$hello
[1] 1 2 3

> b <- "hello"
> a$b

So how could we do the following for example.

> info <- names(a)
> for (i in 1:length(info)){cat(a$info[i]);}


Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
Search the archives:

The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.
It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.
The content of this email is not legally binding unless confirmed by letter.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. For further information about Actelion please see our website at http://www.actelion.com

More information about the Bioconductor mailing list