Re: [Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-14 Thread Abs Spurdle
Martin Maechler Wrote: and we should've tried harder to keep things purely functional (R remaining as closely as possible a "functional language") This is diverging from the original post. However, isn't R a multiparadigm programming language (by design)? [[alternative HTML version delete

Re: [Rd] r76237 broken?

2019-03-14 Thread Ben Bolker
PS there's also a "shQoute(tf2)" on line 1063 that will presumably also cause trouble at some point ... On 2019-03-14 3:57 p.m., Ben Bolker wrote: > It looks like the most recent SVN commit changed line 1068 of > src/library/tools/R/admin.R to include a call to "shQuotee" (sic), which > is now

[Rd] r76237 broken?

2019-03-14 Thread Ben Bolker
It looks like the most recent SVN commit changed line 1068 of src/library/tools/R/admin.R to include a call to "shQuotee" (sic), which is now breaking Travis r-devel builds ... ('checking sizes of PDF files under ‘inst/doc’: .Error in shQuotee(tf) : could not find function "shQuotee"') The new

Re: [Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-14 Thread Martin Maechler
> peter dalgaard > on Thu, 14 Mar 2019 16:18:55 +0100 writes: > I have no recollection of the original rationale for as.data.frame.table, but I actually think it is fine as it is: > The classifying _factors_ of a crosstable should be factors unless very specifically directe

[Rd] selectMethod() can fail to find methods in situations of multiple dispatch

2019-03-14 Thread Pages, Herve
Here is an example: setGeneric("foo", function(x, y) standardGeneric("foo")) setMethod("foo", c("numeric", "ANY"), function(x, y) cat("I'm the foo#numeric#ANY method\n") ) Dispatch works as expected but selectMethod() fails to find the method: > foo(1, TRUE) I'm the foo#numeric#

[Rd] Possible bug in requireNamespace

2019-03-14 Thread David Hugh-Jones
At least, unexpected behaviour. The documentation says: quietly: logical: should progress and error messages be suppressed? But if you do e.g. requireNamespace("broom", quietly = TRUE) requireNamespace("broom.mixed", quietly = TRUE) You will get messages when broom.mixed overrides broom's meth

Re: [Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-14 Thread peter dalgaard
I have no recollection of the original rationale for as.data.frame.table, but I actually think it is fine as it is: The classifying _factors_ of a crosstable should be factors unless very specifically directed otherwise and that should not depend on the setting of an option that controls the c

[Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-14 Thread Mychaleckyj, Josyf C (jcm6t)
Reporting a possible inconsistency or bug in handling stringsAsFactors in as.data.frame.table() Here is a simple test > options()$stringsAsFactors [1] TRUE > x<-c("a","b","c","a","b") > d<-as.data.frame(table(x)) > d x Freq 1 a2 2 b2 3 c1 > class(d$x) [1] "factor" > d2<-as.data.fra