is not idempotent (PR#337)

Kurt Hornik
Wed, 24 Nov 1999 08:19:16 +0100 (CET)

>>>>> maechler  writes:


> gives an error in R (0.90 and earlier)
> but should of course give the same as simply


> This reminds me of similar bug/problem... which I don't recall.

> Yes, I should build tests like these into  "make test-Specific" ..

But not before fixing it, hopefully :-)

>From a brief glance at the code in coerce.c:

SEXP coerceVector(SEXP v, SEXPTYPE type)
    SEXP ans = R_NilValue;      /* -Wall */
    if (TYPEOF(v) == type)
        return v;

    switch (TYPEOF(v)) {
#ifdef NOTYET
    case NILSXP:
        ans = coerceNull(v, type);
    case SYMSXP:
        ans = coerceSymbol(v, type);

So you simply need to write coerceSymbol() and move the #ifdef.

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: