Displaying 2 results from an estimated 2 matches for "possiblemethod".
2012 Nov 13
2
Is function(x){x}(5) a valid expression?
...s surprised to notice that statements like:
h = function(...){list(...)}(x=4)
do not throw syntax errors. R claims that 'h' is now a function, but I
can't seem to call it.
> h = function(x){list(x)}(4)
> is(h)
[1] "function" "OptionalFunction" "PossibleMethod"
> h()
Error in list(x) : 'x' is missing
> h(4)
Error in h(4) : attempt to apply non-function
>
What's going on?
Jamie Olson
[[alternative HTML version deleted]]
2005 Nov 14
1
Tidiest way of modifying S4 classes?
...onnecting that information
into knowledge of how I go about making a new method or slot or
whatever is sensible in this case. What does one make of this:
> getClass(class(kinship:::plot.pedigree))
No Slots, prototype of class "function"
Extends: "OptionalFunction", "PossibleMethod"
Known Subclasses:
Class "MethodDefinition", from data part
Class "genericFunction", from data part
Class "functionWithTrace", from data part
Class "derivedDefaultMethod", by class "MethodDefinition"
Class "MethodWithNext", by class...