Displaying 2 results from an estimated 2 matches for "s4_object".
Did you mean:
nv_object
2019 Sep 14
0
'==' operator: inconsistency in data.frame(...) == NULL
...which tests for the presence of an empty
result value (i.e. list() ) but does not handle a list of empty values
(i.e. list(logical(0))) which in fact is generated in those cases. There
is a simple fix (see also below).
There are other issues with the S4 class example (i.e. data.frame() ==
<s4_object with representation as list>) which fails for different reasons.
##############################################################################
d_0 = data.frame(a = numeric(0)) # zero length data.frame
d_00 = data.frame(numeric(0)) # zero length data.frame without names
names(d_00) <- NULL...
2019 Sep 11
2
'==' operator: inconsistency in data.frame(...) == NULL
Sorry, I can't reproduce the example below even on the same machine.
However, the following example produces the same error as NULL values in
prior examples:
> setClass("FOOCLASS",
+????????? representation("list")
+ )
> ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10)))
> isS4(ma)
[1] TRUE
> data.frame(a=1:3) == ma
Error in