Skip to content
Prev 34766 / 63424 Next

Bug in all.equal() or in the plm package

On Mon, Nov 9, 2009 at 12:24 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
Okay, let's call it "design flaw". Given that the "unusual" behaviour
of length.Formula() causes this problem, I suggest that the
length.Formula() method should be changed. Maybe to something like

R> a <- as.Formula( y ~ x | z | w )
# current behaviour:
R> length(a)
[1] 1 3
# suggested behaviour:
R> length(a)
[1] 2
R> length(a[[1]])
[1] 1
R> length(a[[2]])
[1] 3

This would be more consistent with the usual behaviour of length, e.g.
R> b <- list( 1, 1:3 )
R> length(b)
[1] 2
R> length(b[[1]])
[1] 1
R> length(b[[2]])
[1] 3

/Arne