From sfalcon at fhcrc.org  Tue Feb  7 16:20:17 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Tue, 07 Feb 2006 07:20:17 -0800
Subject: [Rd] match gets confused by S4 objects
In-Reply-To: <17384.39853.165572.356541@stat.math.ethz.ch> (Martin Maechler's
	message of "Tue, 7 Feb 2006 14:07:57 +0100")
References: <m2hd7cjnse.fsf@ziti.local>
	<Pine.LNX.4.61.0602061925190.4469@gannet.stats>
	<17384.39853.165572.356541@stat.math.ethz.ch>
Message-ID: <m2wtg7gpqm.fsf@ziti.local>

On  7 Feb 2006, maechler at stat.math.ethz.ch wrote:
> The solution has been agreed to be changing the internal
> representation of S4 objects making them a new SEXP (basic R
> "type"); and as Brian alludes to, the problem is that those in
> R-core that want to and are able to do this didn't have the time
> for that till now.

The explanations from you are Brian are helpful, thanks.  I was aware
that the issue is the internal representation of S4 objects and was
hoping there might be a cheap work around until a new SEXP comes
around.

It seems that S4 instances are less trivial to detect than one might
expect before actually trying it.  

I suppose one work around is to have an S4Basic class that defines
methods for match(), c(), etc and raises an error.  Then extending
this class gives you some protection.

+ seth



[Rd] match gets confused by S4 objects
Seth Falcon