Skip to content
Prev 3370 / 12125 Next

[R-pkg-devel] RData files with identical objects in package

Thanks a lot - here's is what I get:

A single object matching ?x? was found
It was found in the following places
  package:try
with value

[1] 100

Now put in the last "xfile.RData" - and
"afile.RData" is still muted

Restarting R session...
[1] 100
A single object matching ?x? was found
It was found in the following places
  package:try
with value

[1] 100
[1] 100

Whereas we know x in afile.RData is 45

So something is very wrong
Sorry to be so helpless
BW
Troels

-----Oprindelig meddelelse-----
Fra: Duncan Murdoch <murdoch.duncan at gmail.com> 
Sendt: 13. januar 2019 12:46
Til: Troels Ring <tring at gvdnet.dk>; package-develop <r-package-devel at r-project.org>
Emne: Re: [R-pkg-devel] RData files with identical objects in package
On 13/01/2019 3:38 a.m., Troels Ring wrote:
Does that every happen when ls() returns character(0)?  It seems likely 
that you have copies of them in the global workspace, and the message is 
correct.

In the earlier situation (ls() *does* return character(0), but x is 
still found), you can find where it was found using

getAnywhere("x")

For example,

 > x <- 2
 > getAnywhere("x")
A single object matching ?x? was found
It was found in the following places
   .GlobalEnv
with value

[1] 2

Duncan Murdoch