From mtmorgan at fhcrc.org  Tue Jul  3 09:10:12 2012
From: mtmorgan at fhcrc.org (Martin Morgan)
Date: Tue, 03 Jul 2012 09:10:12 +0200
Subject: [Rd] Dependency problem for "hasArg"
In-Reply-To: <4FF29A15.6000406@jrc.ec.europa.eu>
References: <4FF1B8E3.4050501@jrc.ec.europa.eu>
	<1341246198971-4635158.post@n4.nabble.com>
	<4FF209D2.3010400@fhcrc.org> <4FF29A15.6000406@jrc.ec.europa.eu>
Message-ID: <4FF29AD4.8060704@fhcrc.org>

On 07/03/2012 09:07 AM, Mauricio Zambrano-Bigiarini wrote:
> On 02/07/12 22:51, Martin Morgan wrote:
>> On 07/02/2012 06:23 PM, Charlie Friedemann wrote:
>>> The error message you are getting makes it rather clear what the
>>> problem is.
>>> R is unable to find the function 'hasArg'. As the hasArg function is
>>> part
>>> of the package 'methods', a solution would be to put require(methods)
>>> at the
>>> beginning of your script.
>>
>> But I think the idea will be to import(methods) in HydroGOF, since the
>> package requires these imports to function properly, and import'ing will
>> mean that hasArg does not have to be found on the (user-controlled)
>> search path.
>
> Thank you very much for your help.
>
> I have already tried import(methods) in the NAMESPACE of hydroGOF,
> however, I got the following error message when doing R CMD check:
>
> checking package dependencies ... ERROR
> Namespace dependency not required: ?methods?
>
> So it seems that is not possible to force a package to import 'methods'.

In your DESCRIPTION file, add

Imports: methods

Martin

>
>
> Regarding the Dirk's comment, could it be possible to revisit the
> decision about loading 'methods' in in Rscript ?. BTW, I do not know who
> is responsible for Rscript...
>
>
> Thanks in advance,
>
> Mauricio


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



[Rd] Dependency problem for "hasArg"
Martin Morgan