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

Hong hshen.ca at gmail.com
Wed Mar 25 19:49:10 CET 2009


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 <murd... at stats.uwo.ca> wrote:
> 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. If I want to reference the data frame from package A insted of B, how can I do it?
>
> A::theName
>
> or
>
> B::theName
>
> will find whichever one you want.
>
> Duncan Murdoch
>
> > Thanks!
> > hshen
>
> > ______________________________________________
> > R-h... at r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list