Re: [R] fun.aggregate=mean in reshape

From: [Ricardo Rodriguez] Your XEN ICT Team <>
Date: Tue, 12 Feb 2008 19:31:27 +0100

Sundar Dorai-Raj wrote:
> Do you have an object called 'mean' that's masking the base::mean
> function? I can replicate your error using the following:
> HTH,
It did! I had a mean object in the current workspace. Once it was deleted, the argument works without a glitch.

Sorry for being late with this feedback but I've been isolated for a bunch of hours.

I can reproduce the problem by recreating a mean object. Errors depend on the type of object created and calling explicitly the argument as per the following command (proposed by JiHO) doesn't help

 > cast(aqm, month ~ variable, fun.aggregate=mean)

Could it we advisable that cast, melt or whatever function we deal with throws an more informative error message when this kind of conflicts occur? I am guessing this is a pretty frequent situation, so if it is not done there must be a number of good reasons!

Just my two cents!

Thanks for your help,


Ricardo Rodríguez
Your XEN ICT Team

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 12 Feb 2008 - 18:35:45 GMT

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 12 Feb 2008 - 23:30:13 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive