[BioC] [Limma] annotation (probeids) and as.environment

Ting-Yuan Liu tliu at fhcrc.org
Tue Dec 27 18:45:16 CET 2005


Hi Claudia,

Try this:
         library(annaffy)
         library(pkg, character.only = TRUE)
         x<-paste(pkg,"SYMBOL",sep="")
         y <- get(x)
         is.environment(y)
           [1] TRUE
         probeids <- ls(y)

HTH,
Ting-Yuan

______________________________________
Ting-Yuan Liu
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
Seattle, WA, USA
______________________________________

On Tue, 27 Dec 2005, Claudia Molina wrote:

> Hello and merry christmas!
> 
> I'm trying to make automatically these commands
>         library(annaffy)
>         library(moe430a)
>         probeids <- ls(moe430aSYMBOL)
>         probeids[1:2]
> 
> *If I write the below script, everything is allrigth:
>         x<-moe430aSYMBOL
>         is.environment(x)     #check that "x" object is an environment
>            [1] TRUE
>         probeids <- ls(x)    #store probe names of "moe430a" in probeids 
> object
> 
> *but if  I write:
>         library(annaffy)
>         library(pkg, character.only = TRUE)
>         x<-paste(pkg,"SYMBOL",sep="")
>         is.environment(x)
>           [1] FALSE
>         probeids <- ls(x)
> 
> where "pkg"  is  "moe430a"
> 
> appears the next message: 
>     << Error in as.environment(pos) : no item called "moe430aSYMBOL" in 
> the search list >>
> 
> 
> *I have also tried  
>         probeids <- objects(paste(pkg,"SYMBOL",sep=""))
>             << Error in as.environment(pos) : no item called 
> "moe430aSYMBOL" in the search list >>
> and
>         x<-paste(pkg,"SYMBOL",sep="")
>         as.environment(x)
>              << Error in as.environment(x) : no item called 
> "moe430aSYMBOL" in the search list >>
> 
> but they don't work and  I need all the commands are automatic  (I can't 
> write "x<-moe430aSYMBOL" because my script is inside another and I won't 
> know the name of the package 'a priori')
> 
> Thanks!!!
> 
> Claudia
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list