From wdunlap at tibco.com  Thu Feb  2 20:54:11 2012
From: wdunlap at tibco.com (William Dunlap)
Date: Thu, 2 Feb 2012 19:54:11 +0000
Subject: [Rd] inconsistency with names on call object
Message-ID: <E66794E69CFDE04D9A70842786030B93263817@PA-MBX03.na.tibco.com>

With most sorts of objects the following three expression
have the same value:
    names(obj)
    attr(obj, "names")
    attributes(obj)$names
However, for call objects the last gives NULL, whether there
are names or not.
    > obj <- quote(func(one=1))
    > obj
    func(one = 1)
    > names(obj)
    [1] ""    "one"
    > attr(obj, "names")
    [1] ""    "one"
    > attributes(obj)$names
    NULL
I imagine that the underlying cause is that names are not
stored as other attributes are for call objects.  Is is
just an oversight that attributes(call) does not include
a "names" component?

This can arise when using functions that recursively walk
through objects. 

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 



[Rd] inconsistency with names on call object
William Dunlap