I would add my support for the change.
>From a cursory survey of existing code, I'd say that usage like `class(x)
== 'y'` -- rather than inherits(x, 'y') or is.y -- is probably going to be
the major source of new warnings. So perhaps in the NEWS item it could be
noted as a clue for developers enco
> Hervé Pagès writes:
Thanks: fixed in the trunk with c75223.
Best
-k
> Hi,
> The following error message misspells the name of
> the 'dim' argument:
>> array(integer(0), dim=integer(0))
>Error in array(integer(0), dim = integer(0)) :
> 'dims' cannot be of length 0
> The name of t
> Marco Giuliano writes:
Thanks. Should be fixed in the trunk with c75224: will close the PR
after more testing.
Best
-k
> Bug report submitted :
> https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17459
> Thanks!
> On Fri, Aug 31, 2018 at 6:48 PM Martin Maechler
> wrote:
>> > Marc
Thanks a lot !
Best,
Marco
On Sat, Sep 1, 2018 at 2:48 PM Kurt Hornik wrote:
> > Marco Giuliano writes:
>
> Thanks. Should be fixed in the trunk with c75224: will close the PR
> after more testing.
>
> Best
> -k
>
> > Bug report submitted :
> > https://bugs.r-project.org/bugzilla/show_bug.
The solution below introduces a dependency on data.table, but otherwise
it does what you need:
---
# special method for Foo objects
length.Foo <- function(x) {
length(unlist(x, recursive = TRUE, use.names = FALSE))
}
# an instance of a Foo object
x <- structure(list(a = 1, b = list(b1 = 1, b
For the construct a:b, we get an error if either 'a' or 'b' is empty, e.g.
> x <- integer(0)
> x:3
Error in x:3 : argument of length 0
> 3:x
Error in 3:x : argument of length 0
However, for length(a) > 1 or length(b) > 1, we only get a warning;
> x <- 1:2
> x:3
[1] 1 2 3
Warning in x:3 :
In x:3