Skip to content
Prev 4415 / 63421 Next

all.equal.list() sometimes fails with unnamed and named components (PR#674)

components (PR#674)
Probably not. Lists do have orderings: they are not sets but generic
vectors.
That's not what current versions of S-PLUS give, as one might hope.
I think that both the names and components should match exactly (the
components recursively).  Unfortunately the named-component extraction
is partial matching (at least, sometimes) so the ordering of the names
always matters.  (There's an S/R difference here I keep forgetting to 
write down. I think it is 

x <- list(aa=1, bb=2)
x["a"]

which gives in S
$aa:
[1] 1
and in R
$"NA"
NULL
so S always partial matches, but R does not always.)