Re: [R] how to identify a symbol is defined from which package

2009-03-25 Thread Hong
A::thename works only when thename is exported by the name space A. A:::thename works only when thename is defined in the name space A. getAnywhere(thename)$objs$"package:A" always works. On Mar 25, 6:48 am, Duncan Murdoch wrote: > hong shen wrote: > > Hi list, > > > I encountered a situation th

Re: [R] how to identify a symbol is defined from which package

2009-03-25 Thread Hong
Thanks for your reply. But for some packages, it works. For others, you may get Error: 'theName' is not an exported object from 'namespace:A' What does "exported object" mean? On Mar 25, 6:48 am, Duncan Murdoch wrote: > hong shen wrote: > > Hi list, > > > I encountered a situation that a data

Re: [R] how to identify a symbol is defined from which package

2009-03-25 Thread Duncan Murdoch
hong shen wrote: Hi list, I encountered a situation that a data frame is defined by two packages. Both of them are loaded by library(). My questions are 1. How could I tell the data frame is from which package? find("theName") will tell you where it found a variable called theName. 2. I

Re: [R] how to identify a symbol is defined from which package

2009-03-25 Thread Dieter Menne
hong shen yahoo.com> writes: > > I encountered a situation that a data frame is defined by two packages. Both of them are loaded by library(). > 2. If I want to reference the data frame from package A insted of B, how can I do it? Either change the loading sequence of library(). Or, if you wan

[R] how to identify a symbol is defined from which package

2009-03-24 Thread hong shen
Hi list, I encountered a situation that a data frame is defined by two packages. Both of them are loaded by library(). My questions are 1. How could I tell the data frame is from which package? 2. If I want to reference the data frame from package A insted of B, how can I do it? Thanks! hshen