Hi Michael,
I can't help with S4, but I can help to make sure this isn't a problem
with S7. What do you think of the current error message? Do you see
anything obvious we could do to improve?
library(S7)
dbGetQuery <- new_generic("dbGetQuery", c("conn", "statement"))
dbGetQuery(connection = NULL
I forwarded that along to the original reporter with positive feedback
-- including the argument names is definitely a big help for cuing
what exactly is missing.
Would a patch to do something similar for S4 be useful?
On Thu, Aug 10, 2023 at 6:46 AM Hadley Wickham wrote:
>
> Hi Michael,
>
> I c
I just want to add my 2 cents that I think it would be very useful and
beneficial to improve S4 to surface that information as well.
More information about the way that the dispatch failed would be of great
help in situations like the one Michael pointed out.
~G
On Thu, Aug 10, 2023 at 9:59 AM M
Please find attached a small patch to improve the performance of
as.matrix.dist(). It's a tiny bit more involved than the current code
but does bring a reasonable speed improvement for larger objects
(remaining comparable for smaller ones).
Example:
set.seed(1)
dat <- matrix(rnorm(2), n
Another option that is similar to Enrico's is to use object oriented
programming with R6 or reference objects. I prefer the R6 package
(which will still use an environment like Enrico, but with some
different syntax and a little easier if you want to do this multiple
times.
Here is some example c
Here's a trivial patch that offers some improvement:
Index: src/library/methods/R/methodsTable.R
===
--- src/library/methods/R/methodsTable.R (revision 84931)
+++ src/library/methods/R/methodsTable.R (working copy)
@@ -752,11 +752,12