William Dunlap
2011-Apr-12 15:32 UTC
[Rd] all.equal(data.frame(package_version()), ...) infinite recursion
With R-2.12.2 on Linux: > z <- data.frame(Version=package_version(c("0.1")), row.names=c("pkgA")) > all.equal(z, z) # expect TRUE Error: evaluation nested too deeply: infinite recursion / options(expressions=)? > traceback() ... lots of lines in a 3-cycle ... 6: all.equal.list(target, current, ...) 5: all.equal.default(target[[i]], current[[i]], check.attributes check.attributes, ...) 4: all.equal(target[[i]], current[[i]], check.attributes check.attributes, ...) 3: all.equal.list(target, current, ...) 2: all.equal.default(z, z) 1: all.equal(z, z) This is probably because the [[ method for package_version ([[.numeric_version) acts like a typical [ method, not a [[ method, so all.equal's call to [[ does not burrow into the list: > is.list(z$Version) [1] TRUE > identical(z$Version[[1]], z$Version) [1] TRUE Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com
Possibly Parallel Threads
- RFC for package PopCon: a popularity contest for R and packages
- RFC for package PopCon: a popularity contest for R and packages
- Consider getNamespaceVersion() returning a numeric_version
- Consider getNamespaceVersion() returning a numeric_version
- version comparison puzzle