Skip to content
Prev 17910 / 63424 Next

Subscripting fails if name of element is "" (PR#8161)

On Fri, 7 Oct 2005, Duncan Murdoch wrote:

            
Yes, but I don't see it in PR#8161 where there is no name "NA" that I can
see.  (In other words it is not an instance of the subject line.)

The issue is that <NA> is matching "NA", and it should not.  As in the
code

Rboolean NonNullStringMatch(SEXP s, SEXP t)
{
     if (CHAR(s)[0] && CHAR(t)[0] && strcmp(CHAR(s), CHAR(t)) == 0)
 	return TRUE;
     else
 	return FALSE;
}

and there are more instances around.