The usage of ls("package:hgu95av2.db") shown in AnnotationDbi.pdf
1
0
Entering edit mode
Peng Yu ▴ 940
@peng-yu-3586
Last seen 10.3 years ago
Hi, in AnnotationDbi.pdf, it gives the following example code. I don't quite understand the second command. Does it mean that 'hgu95av2.db' is in the namespace of package? What does ":" mean? library("hgu95av2.db") ls("package:hgu95av2.db") Regards, Peng
AnnotationDbi AnnotationDbi • 1.1k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Thu, Aug 20, 2009 at 6:05 PM, Peng Yu <pengyu.ut@gmail.com> wrote: > Hi, > > in AnnotationDbi.pdf, it gives the following example code. I don't > quite understand the second command. Does it mean that 'hgu95av2.db' > is in the namespace of package? What does ":" mean? > > library("hgu95av2.db") > ls("package:hgu95av2.db") > This is a way of specifying the environment in which to look for R objects. See the help page for search() for details about what this represents. Also, you can try search() in your workspace to get an idea of how ls() and search() work together. Sean [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
On Thu, Aug 20, 2009 at 5:14 PM, Sean Davis<seandavi at="" gmail.com=""> wrote: > > > On Thu, Aug 20, 2009 at 6:05 PM, Peng Yu <pengyu.ut at="" gmail.com=""> wrote: >> >> Hi, >> >> in AnnotationDbi.pdf, it gives the following example code. I don't >> quite understand the second command. Does it mean that 'hgu95av2.db' >> is in the namespace of package? What does ":" mean? >> >> library("hgu95av2.db") >> ls("package:hgu95av2.db") > > This is a way of specifying the environment in which to look for R objects. > See the help page for search() for details about what this represents. > Also, you can try search() in your workspace to get an idea of how ls() and > search() work together. By 'environment', you mean something similiar to 'namespace' in C++, right? Sorry that I have to relate a concept of R to a concept in C++, because C++ is the language that I am most familiar with. Regards, Peng
ADD REPLY
0
Entering edit mode
On Thu, Aug 20, 2009 at 7:40 PM, Peng Yu <pengyu.ut@gmail.com> wrote: > On Thu, Aug 20, 2009 at 5:14 PM, Sean Davis<seandavi@gmail.com> wrote: > > > > > > On Thu, Aug 20, 2009 at 6:05 PM, Peng Yu <pengyu.ut@gmail.com> wrote: > >> > >> Hi, > >> > >> in AnnotationDbi.pdf, it gives the following example code. I don't > >> quite understand the second command. Does it mean that 'hgu95av2.db' > >> is in the namespace of package? What does ":" mean? > >> > >> library("hgu95av2.db") > >> ls("package:hgu95av2.db") > > > > This is a way of specifying the environment in which to look for R > objects. > > See the help page for search() for details about what this represents. > > Also, you can try search() in your workspace to get an idea of how ls() > and > > search() work together. > > By 'environment', you mean something similiar to 'namespace' in C++, > right? Sorry that I have to relate a concept of R to a concept in C++, > because C++ is the language that I am most familiar with. > Yes, if that helps. Sean [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 702 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