From lorenz at usgs.gov  Wed Oct 29 21:44:31 2014
From: lorenz at usgs.gov (Lorenz, David)
Date: Wed, 29 Oct 2014 15:44:31 -0500
Subject: [Rd] Unexpected behavior of identical() with language objects
In-Reply-To: <CAFOpNVGxxqH0uYjouj6rG9b9LdbigQQbNDWgvS8NxhYnn61F8A@mail.gmail.com>
References: <CAFOpNVGxxqH0uYjouj6rG9b9LdbigQQbNDWgvS8NxhYnn61F8A@mail.gmail.com>
Message-ID: <CALxY2LcJzS18wh4_QPwmOnWJLvcwVM38y2b5y4djMjTh9fnSeQ@mail.gmail.com>

Fascinating! I tried the comparisons with all.equal(), expecting a
description of the difference, but TRUE was returned in both cases.
Dave


On Wed, Oct 29, 2014 at 3:26 PM, Winston Chang <winstonchang1 at gmail.com>
wrote:

> I ran into this and found the result very surprising:
>
> identical( quote({ a }),  quote({ a }) )
> # FALSE
>
> It seems related to curly braces. For example, parens work fine:
> identical( quote(( a )),  quote(( a )) )
> # TRUE
>
> Is this expected behavior? I can't seem to find anything in the help
> for identical that relates to this.
>
> -Winston
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] Unexpected behavior of identical() with language objects
Lorenz, David