Displaying 2 results from an estimated 2 matches for "mspathcoefficients".
2006 Dec 01
2
promptClass misses methods
I've had repeated problems with promptClass missing methods, usually
telling me a class has no methods when it does.
In my current case, I've defined an S4 class "mspathCoefficients" with
a print method
setMethod("print", signature(x="mspathCoefficients"), function(x, ...)
{ # etc
The file promptClass creates has no methods in it.
> showMethods(classes="mspathCoefficients")
Function: initialize (package methods)
.Object="mspathCoeffi...
2006 Nov 24
1
Missing values for S4 slots
Using R 2.4, the following fails:
setClass("testc", representation(a="ANY"))
makeC <- function(myarg) new("testc", a=myarg)
makeC()
-> Error in initialize(value, ...) : argument "myarg" is missing,
with no default
On the other hand, this is OK:
f <- function(a) g(b=a)
g <- function(b) if(missing(b)) "missing" else "valid