Re: [Rd] Dependency problem for "hasArg"

From: Mauricio Zambrano-Bigiarini <mauricio.zambrano_at_jrc.ec.europa.eu>
Date: Tue, 03 Jul 2012 09:36:43 +0200

On 03/07/12 09:10, Martin Morgan wrote:
> 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
>
Thank you very much Martin.

Now hydroGOF with import(methods) pass R CMD check without any problem.

All the best,

Mauricio

>>
>>
>> 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
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 03 Jul 2012 - 07:40:40 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 03 Jul 2012 - 12:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive