Displaying 8 results from an estimated 8 matches for "makeprototypefromclassdef".
2003 Jun 23
3
FW: S4 classes, creating in C
...7.1 but if I initialise any of the slots
setClass("LUdecomposition", representation(a="matrix", pivot = "integer"),
prototype=list(pivot = NA) )
then I get the following error message in R 1.7.1 but not R 1.7.0
Error in makePrototypeFromClassDef(properties, ClassDef, immediate) :
In making the prototype for class "LUdecomposition" elements of the
prototype
failed to match the corresponding slot class: pivot (class " integer
")
Why can I no longer use the prototype to set the default values?
Laurence Ke...
2008 Mar 26
5
S4 slot with NA default
...n, I will create a new object with the correct value inserted in
the slot.
I want "NA" to signify "not known".
My attempt fails because NA is not numeric:
>
setClass
("foo",representation=representation(x="numeric"),prototype=list(x=NA))
Error in makePrototypeFromClassDef(properties, ClassDef, immediate,
where) :
in making the prototype for class "foo" elements of the prototype
failed to match the corresponding slot class: x (class ?numeric? )
>
(the real application has other slots too). I can
use "NaN", which is numeric:
>...
2004 Oct 14
2
setClassUnion
...character = TRUE, quietly = TRUE)
}
setClassUnion("OptionalNumeric", c("numeric", "NULL"))
setClass("class1",
representation(test1 = "OptionalNumeric"),
prototype(test1 = numeric(1)))
# why does this not work?
# The error I get is:
# Error in makePrototypeFromClassDef(properties, ClassDef, immediate,
# where) :In making the prototype for class "class1" elements of the
# prototype failed to match the corresponding slot class: test1
# (class "OptionalNumeric ")
# Sourcing this into R gives no error for me
# but instead using
prototype(test1...
2004 Oct 14
2
setClassUnion
...character = TRUE, quietly = TRUE)
}
setClassUnion("OptionalNumeric", c("numeric", "NULL"))
setClass("class1",
representation(test1 = "OptionalNumeric"),
prototype(test1 = numeric(1)))
# why does this not work?
# The error I get is:
# Error in makePrototypeFromClassDef(properties, ClassDef, immediate,
# where) :In making the prototype for class "class1" elements of the
# prototype failed to match the corresponding slot class: test1
# (class "OptionalNumeric ")
# Sourcing this into R gives no error for me
# but instead using
prototype(test1...
2007 Nov 13
1
slots of type "double"
Hi,
Any idea why S4 doesn't allow slots of type "double"?
> setClass("A", representation(a="double"))
Error in makePrototypeFromClassDef(properties, ClassDef, immediate, where) :
in making the prototype for class "A" elements of the prototype failed to
match the corresponding slot class: a (class ?double? )
"numeric", "integer", "character", "complex", "raw", etc... t...
2005 May 26
3
Buidling R on Linux (Itanium) fails (PR#7897)
...Kernel
Libraries
for BLAS/LAPACK
Optimizations used were -O3, and the
FPICFLAGS="-fpic"
was exported.
The build failed with the following error message:
...
dumping R code in package 'methods'
Saving namespace image ...
initializing class and method definitions now ...Error in
makePrototypeFromClassDef(properties, ClassDef, immediate, where) :
in making the prototype for class "SClassExtension" elements of the
prototype failed to match the corresponding slot class: coerce (class
?character? ), test (class ?character? ), replace (class ?character? ), simple
(class ?character? ),...
2012 Mar 07
2
SSOAP and Chemspider: Security token?
...the error message from the genSOAPClientInterface call is:
Note: Method with signature "ClassDefinition#list" chosen for function "resolve",
target signature "ExtendedClassDefinition#SchemaCollection".
"SOAPType#SchemaCollection" would also be valid
Fehler in makePrototypeFromClassDef(properties, ClassDef, immediate, where) :
'name' muss eine nicht-Null Zeichenkette sein
Zusätzlich: Warnmeldung:
undefined slot classes in definition of "ExactStructureSearchOptions": NA(class "EMatchType")
[[alternative HTML version deleted]]
2006 Jun 15
0
S4 class slot name 'names' is not allowed (PR#8768 S4Methods)
...;myVclass"
The need to quote "VIRTUAL" is the first bug, but read on.
Now take the above example, and change the first slot's name to ".Data."
Now, one gets:
setClass("myVclass", representation(.Data = "character", "VIRTUAL"))
Error in makePrototypeFromClassDef(properties, ClassDef, immediate,
where) : in constructing the prototype for class "myVclass": prototype has
class "list", but the data part specifies class "character"
So "names" is not the only problematic slot name.
Marshall Feldman
Dr. Marshall Feldman...