[Rd] DispatchOrEval missing in do_isfinite and do_isinfinite (PR#7951)

From: <lars_at_predict.com>
Date: Thu 16 Jun 2005 - 21:22:05 GMT


Full_Name: Lars Hansen
Version: 2.1.0
OS: SunOS 5.8
Submission from: (NULL) (207.66.36.189)

Hi,

S4 method displacth does not work for the two generic functions 'is.finite' and
'is.infinite'. It turns out that the C functions 'do_isfinite' and
'do_isinfinite' in src/main/coerce.c are missing a call to 'DispatchOrEval' (see
do_isnan). Added in the call fixed the problem. My functions no look like this:

Form coerce.c:

SEXP do_isfinite(SEXP call, SEXP op, SEXP args, SEXP rho) {

    SEXP ans, x, names, dims;
    int i, n;

    if (DispatchOrEval(call, op, "is.finite", args, rho, &ans, 1, 1))

        return(ans);

    checkArity(op, args);
    ...

SEXP do_isinfinite(SEXP call, SEXP op, SEXP args, SEXP rho) {

    SEXP ans, x, names, dims;
    double xr, xi;
    int i, n;

    if (DispatchOrEval(call, op, "is.infinite", args, rho, &ans, 1, 1))

        return(ans);

    checkArity(op, args);
    ...

Thanks you,
Lars



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Jun 17 07:32:18 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:09 GMT