Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0305091535230.18953-100000@gannet.stats>
Date: 2003-05-09T14:43:46Z
From: Brian Ripley
Subject: getAttr problem
In-Reply-To: <BA5106B991DBAE49AEB14CB58EDFA7AA01188EE4@atlexm04.na.mirant.net>

On Fri, 9 May 2003, Stoyanov, Tsvetan wrote:

> It seems that getAttr doesn't return "names" attribute properly as in

Is this getAttrib?

> getAttrib(x, R_NamesSymbol));

Really?  As it is widely used inside R, that seems implausible.

> 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. 

But the outer product is a matrix and does not have names, so NULL is 
correct.

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

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).

> Is there something I am missing?

Yes: could you supply a complete example with the results you get and an 
explanation as to why you think it is wrong?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595