[Rd] Bug in all.equal() or in the plm package

From: Arne Henningsen <arne.henningsen_at_googlemail.com>
Date: Mon, 09 Nov 2009 11:29:54 +0100


Hi!

I noticed that there is a (minor) bug either the command all.equal() or in the "plm" package. I demonstrate this using an example taken from the documentation of plm():



R> data("Produc", package="plm")
R> zz <- plm(log(gsp)~log(pcap)+log(pc)+log(emp)+unemp, + data=Produc, index=c("state","year")) R> all.equal(zz,zz)
[1] TRUE
Warning message:
In if (length(target) != length(current)) return(paste("target, current differ in having response: ", :   the condition has length > 1 and only the first element will be used
> all.equal(zz$formula,zz$formula)

[1] TRUE
Warning message:
In if (length(target) != length(current)) return(paste("target, current differ in having response: ", :   the condition has length > 1 and only the first element will be used
> class(zz$formula)

[1] "pFormula" "Formula" "formula"

The last commands show that the warning message comes from comparing the elements "formula", which are of the class "pFormula" (inheriting from "Formula" and "formula"). It would be great if this issue could be fixed in the future.

Thanks a lot,
Arne

-- 
Arne Henningsen
http://www.arne-henningsen.name

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 09 Nov 2009 - 10:32:24 GMT

This archive was generated by hypermail 2.2.0 : Wed 25 Nov 2009 - 16:20:47 GMT