Skip to content

getAttr problem

2 messages · Stoyanov, Tsvetan, Brian Ripley

#
Hi all,

It seems that getAttr doesn't return "names" attribute properly as in
getAttrib(x, R_NamesSymbol));

If you look at section 4.7.4 in "Writing R Extensions", the second example of
SEXP out(SEXP, SEXP) returns NULL for the names attribute of the 
outer product. 

This is true for  R 1.7.0 on both Win2000 with mingw and Redhat 9.0 with gcc.

Is there something I am missing?
Best,
Tsvetan
#
On Fri, 9 May 2003, Stoyanov, Tsvetan wrote:

            
Is this getAttrib?
Really?  As it is widely used inside R, that seems implausible.
But the outer product is a matrix and does not have names, so NULL is 
correct.
Well, the source code is the same for both systems, so that is not 
surprising (and BTW `mingw' is on ix86 port of gcc, and RH9 (no .0?) 
uses another ix86 port of gcc).
Yes: could you supply a complete example with the results you get and an 
explanation as to why you think it is wrong?