From tplate at blackmesacapital.com  Tue Apr 20 17:03:56 2004
From: tplate at blackmesacapital.com (Tony Plate)
Date: Tue Apr 20 17:04:04 2004
Subject: [Rd] Re: [R] Unexpected behaviour of identical (PR#6799)
In-Reply-To: <20040420114244.86AF4104BA@slim.kubism.ku.dk>
References: <20040420114244.86AF4104BA@slim.kubism.ku.dk>
Message-ID: <6.1.0.6.2.20040420090025.03fcf3e0@mailhost.blackmesacapital.com>

What about changing identical() to ignore the order of attributes?  Is 
there any code anywhere that depends on the order of attributes, other than 
identical()?  I've only seen attributes treated as an unordered set, and 
never as an ordered list.  There are some functions in S-plus that change 
the order of attributes, and the only thing this affects is 
identical().  (Which in S-plus also pays attention to the order of attributes.)

-- Tony Plate

At Tuesday 05:42 AM 4/20/2004, p.dalgaard@biostat.ku.dk wrote:
>"Swinton, Jonathan" <Jonathan.Swinton@astrazeneca.com> writes:
>
> >  # works as expected
> > > ac <- c('A','B');
> > > identical(ac,ac[1:2])
> > [1] TRUE
> >
> >  #but
> > > af <- factor(ac)
> > > identical(af,af[1:2])
> > [1] FALSE
> >
> > Any opinions?
>
>Did a cross-check with Splus and it doesn't do that , so I think it
>qualifies as a bug. Shouldn't be too hard to fix (might lose a little
>efficiencty though).
>
>--
>    O__  ---- Peter Dalgaard             Blegdamsvej 3
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
>~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
>
>______________________________________________
>R-devel@stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-devel


[Rd] Re: [R] Unexpected behaviour of identical (PR#6799)
Tony Plate