From murdoch at stats.uwo.ca  Wed Jan 23 18:24:15 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Wed, 23 Jan 2008 12:24:15 -0500
Subject: [Rd] Package Building and Name Space
In-Reply-To: <200801231731.00579.johannes_graumann@web.de>
References: <fn7ov3$2d6$1@ger.gmane.org> <47976A82.2060404@stats.uwo.ca>
	<200801231731.00579.johannes_graumann@web.de>
Message-ID: <4797783F.1020309@stats.uwo.ca>

On 1/23/2008 11:31 AM, Johannes Graumann wrote:
> On Wednesday 23 January 2008 17:25:38 Duncan Murdoch wrote:
>> On 1/23/2008 11:11 AM, Johannes Graumann wrote:
>> > ... sorry for reposting this in a more appropriate forum than r.general
>> > ...
>> >
>> > Hello,
>> >
>> > I just don't get this and would appreciate if someone could write a line
>> > or two: I'm trying to build this package and it stops installing after I
>> > add
>> >
>> > the following to the NAMESPACES file:
>> >>importFrom(gsubfn,strapply)
>> >
>> > The error during the package test is:
>> >
>> > Error in MyPackage::MyFunction :
>> >   package 'MyPackage' has no name space and is not on the search path
>> > Calls: <Anonymous> ... <Anonymous> -> switch -> sys.source -> eval ->
>> > eval -> ::
>> > Execution halted
>> >
>> > 'MyFunction' contains 'strapply' from gsubfn.
>> >
>> > Please tell me where I err.
>>
>> The file is called NAMESPACE, not NAMESPACES.
> 
> And that's what it's called here ... sorry for the typo above. The error 
> remains the same.

With the obscuring you've done it's pretty hard to be sure, but I'd 
assume you have the expression MyPackage::MyFunction somewhere in your 
package, but MyPackage doesn't have a namespace.  In that case, you have 
to make sure it is attached via

library(MyPackage)

or

require(MyPackage)

before you can use the "::" operator.

Duncan Murdoch



[Rd] Package Building and Name Space
Duncan Murdoch