From mauricio.zambrano at jrc.ec.europa.eu  Tue Jul  3 09:07:01 2012
From: mauricio.zambrano at jrc.ec.europa.eu (Mauricio Zambrano-Bigiarini)
Date: Tue, 03 Jul 2012 09:07:01 +0200
Subject: [Rd] Dependency problem for "hasArg"
In-Reply-To: <4FF209D2.3010400@fhcrc.org>
References: <4FF1B8E3.4050501@jrc.ec.europa.eu>
	<1341246198971-4635158.post@n4.nabble.com> <4FF209D2.3010400@fhcrc.org>
Message-ID: <4FF29A15.6000406@jrc.ec.europa.eu>

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


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
-- 
====================================================
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
webinfo    : http://floods.jrc.ec.europa.eu/
====================================================
DISCLAIMER:
"The views expressed are purely those of the writer
and may not in any circumstances be regarded as sta-
ting an official position of the European Commission"
====================================================
Linux user #454569 -- Ubuntu user #17469
====================================================
"The only things in life you regret,
Are the risks that you didn't take"
(Anonymous)

>
> Martin
>
>>
>> For whatever reason, loading R via Rscript does not load the base package
>> "methods" whereas loading the R console does. I'm not entirely sure
>> why this
>> is the case, and I'm sure someone who knows more about the differences
>> between the two could chime in here.
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/Dependency-problem-for-hasArg-tp4635147p4635158.html
>>
>> Sent from the R devel mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] Dependency problem for "hasArg"
Mauricio Zambrano-Bigiarini