Skip to content

format: different S4 behavior in a package

4 messages · Daniel Murphy, Uwe Ligges, Martin Morgan

#
There is not a single definition of
formatMe()
in your message, therefore nothing works for me, not even the very first 
version...

Best,
Uwe Ligges
On 23.06.2010 09:16, Daniel Murphy wrote:
#
On 06/23/2010 12:16 AM, Daniel Murphy wrote:
This is the clue -- you're creating a new S4 generic, so there's a
base::format, and a .GlobalEnv::format. Test::formatMe respects its name
space, and sees base::format.

In the S3 case, base::format is already an S3 generic, and you're just
adding a method, so there's only base::format for everyone to find.

In Test, you could setGeneric(format) and then export(format). It might
also be enough to just export(format); I'm not sure.

Martin