Why does a custom function called is.numeric.factor break lattice?
Thanks Duncan. You are right; I missed this. Namespaces and full qualification seems the only reliable solution to the general issue though -- right? Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Mon, Nov 16, 2015 at 7:42 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
On 16/11/2015 10:22 AM, Bert Gunter wrote:
There is no multiple dispatch; just multiple misunderstanding. The generic function is "is.numeric" . Your method for factors is "is.numeric.factor". You need to re-study.
I think the problem is with S3. "is.numeric.factor" could be a "numeric.factor" method for the "is" generic, or a "factor" method for the "is.numeric" generic. Using names with dots is a bad idea. This would be all be simpler and less ambiguous if the class had been named "numeric_factor" or "numericFactor" or anything without a dot. Duncan Murdoch