Displaying 11 results from an estimated 11 matches for "fooclass".
2017 Apr 19
2
Crash after (wrongly) applying product operator on S4 object that derives from list
Dear Hilmar
Perhaps this gives an indication of why the infinite recursion happens:
## after calling `*` on ma and a matrix:
> showMethods(classes=class(ma), includeDefs=TRUE, inherited = TRUE)
Function: * (package base)
e1="FOOCLASS", e2="matrix"
(inherited from: e1="vector", e2="structure")
(definition from function "Ops")
function (e1, e2)
{
value <- callGeneric(e1, e2 at .Data)
if (length(value) == length(e2)) {
e2 at .Data <- value
e2...
2019 Sep 14
0
'==' operator: inconsistency in data.frame(...) == NULL
...an error
#########################################################################################
# non-empty return value but failing in the same code line due to
incompatible dimensions.
# should Ops.data.frame at all be dispatched for <data.frame> == <S4
object> ?
setClass("FOOCLASS",
????????? representation("list")
)
ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10)))
isS4(ma)
d_3 == ma # error A
##########################################################################################
Best regards,
Hilmar
Am 11/09/2019 um 13:26 schrieb Hilmar...
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 matrix(unlist(value, recursive = FALSE, use.names = FALSE),
nrow = nr,? :
? length of 'dimnames' [2...
2017 Apr 18
3
Crash after (wrongly) applying product operator on object from LIMMA package
Hi,
this is a problem that occurs in the presence of two libraries (limma,
xlsx) and leads to a crash of R. The problematic code is the wrong
application of sweep or the product ("*") function on an LIMMA MAList
object. To my knowledge, limma does not define a "*" method for MAList
objects.
If only LIMMA is loaded but not package xlsx, the code does not crash
but rather
2017 Apr 19
0
Crash after (wrongly) applying product operator on S4 object that derives from list
...e> wrote:
> Dear Hilmar
>
> Perhaps this gives an indication of why the infinite recursion happens:
>
> ## after calling `*` on ma and a matrix:
>
>> showMethods(classes=class(ma), includeDefs=TRUE, inherited = TRUE)
>
>
> Function: * (package base)
> e1="FOOCLASS", e2="matrix"
> (inherited from: e1="vector", e2="structure")
> (definition from function "Ops")
> function (e1, e2)
> {
> value <- callGeneric(e1, e2 at .Data)
> if (length(value) == length(e2)) {
> e2 at...
2003 May 21
2
"locked environment"
I have a class defined as an extension to matrix:
fooCLASS <- setClass("foo",representation("matrix"))
and define a method for a generic function (no problem):
setMethod("diff",signature(x="foo"),diff.foo <- function(x){x})
but I get a different behaviour for another generic function:
setMethod("lag"...
2007 Jul 21
1
Testing shorthand array push <<
Hi everyone,
I''m trying to test the shorthand way to push objects into an array. My
controller looks like:
current_user.foos << @foo
and I keep getting an error like Mock ''foos'' received unexpected message :<<
with <FooClass>
does anyone have a good solution for this?
I tried controller.send(:current_user).labels.stub!(:<<).and_return([]) and
that didn''t work.
TIA!
-Lance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attac...
2017 Apr 24
2
Crash after (wrongly) applying product operator on object from LIMMA package
...ng to
see whether anyone with a Mac can reproduce it.
kind regards,
j.
On 19 April 2017 at 10:01, Hilmar Berger <berger at mpiib-berlin.mpg.de> wrote:
> Hi,
>
> following up on my own question, I found smaller example that does not
> require LIMMA:
>
> setClass("FOOCLASS",
> representation("list")
> )
> ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10)))
>
> > ma * ma$M
> Error: C stack usage 7970512 is too close to the limit
>
> > library(xlsx)
> Loading required package: rJava
> Loading re...
2017 Apr 19
0
Crash after (wrongly) applying product operator on object from LIMMA package
Hi,
following up on my own question, I found smaller example that does not
require LIMMA:
setClass("FOOCLASS",
representation("list")
)
ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10)))
> ma * ma$M
Error: C stack usage 7970512 is too close to the limit
> library(xlsx)
Loading required package: rJava
Loading required package: xlsxjars
> ma * ma$M
---&...
2019 Sep 11
2
'==' operator: inconsistency in data.frame(...) == NULL
Dear Martin,
On 11/09/2019 09:56, Martin Maechler wrote:
>
> > I wonder if data.frame(<some non-empty data>) == NULL should also return
> > a value instead of an error. R help reads:
>
> > "At least one of |x| and |y| must be an atomic vector, but
> > if the other is a list R attempts to coerce it to the
> > type of the atomic
2017 Apr 24
0
Crash after (wrongly) applying product operator on object from LIMMA package
...;
> On 19 April 2017 at 10:01, Hilmar Berger <berger at mpiib-berlin.mpg.de
> <mailto:berger at mpiib-berlin.mpg.de>> wrote:
>
> Hi,
>
> following up on my own question, I found smaller example that does
> not require LIMMA:
>
> setClass("FOOCLASS",
> representation("list")
> )
> ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10)))
>
> > ma * ma$M
> Error: C stack usage 7970512 is too close to the limit
>
> > library(xlsx)
> Loading required pa...