Skip to content
Prev 39861 / 63424 Next

Package Name Not Found Warning

On 04/19/2011 05:00 PM, Dario Strbenac wrote:
For what it's worth, this comes up when a class is being created in an 
environment that is not the global environment or does not have a 
variable .packageName, apparently added early in the name space creation 
process. You can mimic this with

   setClass("A", where=new.env())

or

   local({ setClass("A", where=environment()) })

Kind of doubt whether you've actually done something like that in your 
package, but maybe it twigs something...

Also, if you add

   trace(methods::getPacakgeName, quote(print(where)))

or

   trace(warning, quote(print(sys.calls())))

somewhere early in your package (the top of the first file to be 
collated) you'll get messages that might point to where things are going 
wrong.

Hope that helps,

Martin