From maechler at stat.math.ethz.ch  Fri Sep  4 10:25:42 2009
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Fri, 4 Sep 2009 10:25:42 +0200
Subject: [Rd] Documentation for is.atomic and is.recursive
In-Reply-To: <f8e6ff050909021202g6c16d013rc1698b2170cd041d@mail.gmail.com>
References: <8b356f880909021139pa07d922q1f1c28a0fb70cdbe@mail.gmail.com>
	<8b356f880909021154r22b8d14ajd7627fcf3263b444@mail.gmail.com>
	<f8e6ff050909021202g6c16d013rc1698b2170cd041d@mail.gmail.com>
Message-ID: <19104.52998.926010.520146@lynne.math.ethz.ch>

>>>>> "hw" == hadley wickham <h.wickham at gmail.com>
>>>>>     on Wed, 2 Sep 2009 14:02:06 -0500 writes:

    hw> On Wed, Sep 2, 2009 at 1:54 PM, Stavros
    hw> Macrakis<macrakis at alum.mit.edu> wrote:
    >> On Wed, Sep 2, 2009 at 2:39 PM, Stavros
    >> Macrakis<macrakis at alum.mit.edu> wrote:
    >> 
    >>> ???? Most types of language objects are regarded as
    >>> recursive: those ???? which are not are the atomic
    >>> vector types, 'NULL' and symbols (as ???? given by
    >>> 'as.name').
    >>> 
    >>> But is.recursive(as.name('foo')) ==
    >>> is.recursive(quote(foo)) == FALSE.
    >> 
    >> Sorry, this *is* consistent with the behavior. ?But if we
    >> read "the atomic vector types, 'NULL' and symbols" as a
    >> list of mutually exclusive categories, then
    >> is.atomic(NULL)==FALSE is inconsistent.

    hw> And the sentence could be more clearly written as:

    hw> Most types of language objects are regarded as
    hw> recursive, except for atomic vector types, 'NULL' and
    hw> symbols (as given by 'as.name').

yes, that's a shorter and more elegant.
But before amending that,  why 
"language objects" instead of just "R objects" or "objects" ?
  
In the context of S and R when I'd hear  "language objects",
I'd think of the results of
    expression() , formula(), substitute(), quote()
i.e., objects for which  is.language() was true.

So, I'm proposing

  Most types of objects are regarded as recursive, except for
  atomic vector types, \code{NULL} and symbols (as given by
  \code{\link{as.name}}).

--
Martin Maechler



[Rd] Documentation for is.atomic and is.recursive
Martin Maechler