Re: [Rd] Bug in dt() function in stats - accuracy only 6 dp.

2019-01-10 Thread Martin Maechler
> mark chappell via R-devel > on Wed, 9 Jan 2019 13:10:26 +1100 writes: > Hi I believe the dt() function in stats has small areas of > inaccuracy. > SmallRangeMostDetaileddf150.png shows this occurring in > the 10-11th decimal place. > MyD4 is computed using

[Rd] setClass accepts slot-mismatch between slots and prototype arguments

2019-01-10 Thread William Dunlap via R-devel
I was installing the 'diffobj' package into TERR and got an error from the call StyleSummary <- setClass("StyleSummary", slots=c(container="ANY", body="ANY", map="ANY"), prototype=list( container=function(x) sprintf("\n%s\n", paste0(x, collapse="")), body=identity, detail=function(x

Re: [Rd] setClass accepts slot-mismatch between slots and prototype arguments

2019-01-10 Thread brodie gaslam via R-devel
Indeed that was on oversight on my part.  It is surprising that things like this work: > setClass('test', slots=c(a='ANY'), prototype=list(a=NULL, b='hello')) > new('test')@b [1] "hello" > slotNames(new('test')) [1] "a" I'm planning a release of diffobj right now so I will fix this, but I agree

Re: [Rd] setClass accepts slot-mismatch between slots and prototype arguments

2019-01-10 Thread Michael Lawrence via R-devel
Thanks for the report. There is a comment from 2001 in the header for reconcilePropertiesAndPrototype() that states: "The prototype may imply slots not in the properties list. It is not required that the extends classes be define at this time. Should it be?" But somewhere in the mid 2000's, I t

[Rd] strtoi output of empty string inconsistent across platforms

2019-01-10 Thread Michael Chirico
Identified as root cause of a bug in data.table: https://github.com/Rdatatable/data.table/issues/3267 On my machine, strtoi("", base = 2L) produces NA_integer_ (which seems consistent with ?strtoi: "Values which cannot be interpreted as integers or would overflow are returned as NA_integer_"). B