[BioC] question on hgu95 metadata and ontoTools

Robert Gentleman rgentlem at jimmy.harvard.edu
Wed Dec 17 21:55:57 MET 2003

On Wed, Dec 17, 2003 at 03:47:54PM -0500, Elisabetta Manduchi wrote:
> Hi,
> I would like to create an environment that combines the hgu95av2GO, 
> hgu95bGO, ...hgu95eGO into just one environment, that I can subsequently 
> use as the otkvEnv argument in the ontoTools function otkvEnv2namedSparse.
> Is there a quick and simple way to do this in R, without having to define 
> a new hash and the key-value mapping block by block (according to which 
> environment the key belongs to)? In other words, I'm asking if there is a 
> one-stop way in R to "union" the above 5 environments.

 Sort of, in R there are no hash tables but environments are close so
 we used them. They have a rather unique aspect which is the parent
 environment. So that if a value is not found in the first environment
 the parent is searched. So to solve your problem you could do some
 thing like

   parent.env(E2) <- E1
   parent.env(E3) <- E2

  then do your get's on E1 (with inherits=TRUE, which is the default
  in get) and you should be almost set. The one issue that is not
  easily solved is the if inherits is TRUE then you search up beyond
  the last of your environments (your work space and then the search
  list). But that should not be a problem in your case....


> Thanks,
> Elisabetta
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor

| Robert Gentleman                 phone : (617) 632-5250                   |
| Associate Professor              fax:   (617)  632-2444                   |
| Department of Biostatistics      office: M1B20                            |
| Harvard School of Public Health  email: rgentlem at jimmy.harvard.edu        |

More information about the Bioconductor mailing list