Skip to content
Back to formatted view

Raw Message

Message-ID: <5CE629D08E0E904F8645FAEFD2AEB5950107DE@ARTSMAIL8.ARTSNET.AUCKLAND.AC.NZ>
Date: 2011-11-02T00:31:14Z
From: Oliver Mannion (COMPASS)
Subject: Removing or ignoring package version for generic function in locked environment

Hi,

I use the epicalc package which provides the function aggregate.numeric.

Unfortunately aggregate.numeric produces warnings when aggregate is used by functions not under my control on a numeric value. If I don't load epicalc, aggregate.default is used instead by these functions and does not produce any warning.

However I need epicalc. So to get around this, what I would do is firstly remove aggregate.numeric:

rm(aggregate.numeric, pos=which(search() == "package:epicalc"))

This worked fine in R 2.13.1. However in R 2.14.0 I am getting the following:

Error in rm(aggregate.numeric, pos = which(search() == "package:epicalc")) : 
  cannot remove bindings from a locked environment

Is there some way I can remove aggregate.numeric, or otherwise prevent it from being used?

Thanks in advance,

Oliver