From saikat at stat.wisc.edu  Thu Oct  9 18:18:16 2003
From: saikat at stat.wisc.edu (saikat@stat.wisc.edu)
Date: Thu Oct  9 17:17:20 2003
Subject: [Rd] S4 group generic Complex not working (PR#4483)
Message-ID: <200310091518.h99FIG0P006941@pubhealth.ku.dk>

The Complex group generic for S4 methods is not working:

 > setClass('foo', representation(z='complex'))
[1] "foo"
 > setMethod('Complex', 'foo', function(z) callGeneric(z@z))
[1] "Complex"
 > Arg(new('foo', z=1+0i))
Error in Arg(new("foo", z = 1 + (0+0i))) :
         non-numeric argument to function
 >

The fix is to add

     if (DispatchGroup("Complex", call, op, args, env, &x))
	return x;

near the beginning of do_cmathfuns in complex.c.

--please do not edit the information below--

Version:
  platform = i686-pc-linux-gnu
  arch = i686
  os = linux-gnu
  system = i686, linux-gnu
  status =
  major = 1
  minor = 8.0
  year = 2003
  month = 10
  day = 08
  language = R

Search Path:
  .GlobalEnv, package:methods, package:ctest, package:mva, 
package:modreg, package:nls, package:ts, Autoloads, package:base


[Rd] S4 group generic Complex not working (PR#4483)
saikat@stat.wisc.edu