[Limma] annotation (probeids) and as.environment
1
0
Entering edit mode
Beatriz ▴ 100
@beatriz-1472
Last seen 10.2 years ago
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
probe probe • 1.1k views
ADD COMMENT
0
Entering edit mode
@ting-yuan-liu-fhcrc-1221
Last seen 10.2 years ago
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 >
ADD COMMENT
0
Entering edit mode
Thanks!!!! it works!!!! Thank you thank you Claudia Ting-Yuan Liu wrote: >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 >> >> >> > > >
ADD REPLY

Login before adding your answer.

Traffic: 529 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6