[Rd] conflicting S4 generics

From: Torsten Hothorn <Torsten.Hothorn_at_rzmail.uni-erlangen.de>
Date: Wed 15 Feb 2006 - 09:26:55 GMT

Good morning again,

there is a second problem which keeps us from finishing new releases.

Package `kernlab' defines a `fit' S4 generic and `modeltools' does as well (so this is kind of an internal communication problem). `party' and `kernlab' define methods for `fit' and export them in their namespaces.

Now, when I attach `party' I get

R> library("party")
R> getMethods(fit)
model = "StatModel", data = "ModelEnv":
structure(function (model, data, ...)
model@fit(data, ...), class = structure("MethodDefinition", package =
"methods"), target = structure(c("StatModel",
"ModelEnv"), .Names = c("model", "data"), class = structure("signature",
package = "methods")), defined = structure(c("StatModel",
"ModelEnv"), .Names = c("model", "data"), class = structure("signature",
package = "methods")))

model = "StatModel", data = "LearningSample": structure(function (model, data, ...)
model@fit(data, ...), class = structure("MethodDefinition", package =
"methods"), target = structure(c("StatModel",
"LearningSample"), .Names = c("model", "data"), class =
structure("signature", package = "methods")), defined = structure(c("StatModel",
"LearningSample"), .Names = c("model", "data"), class =
structure("signature", package = "methods")))

Now, when I additionally attach `kernlab', only the `kernlab' definitions remain active

R> getMethods(fit)
object = "ksvm":
structure(function (object)
object@fit, class = structure("MethodDefinition", package = "methods"), target = structure("ksvm", .Names = "object", class = structure("signature", package = "methods")), defined = structure("ksvm", .Names = "object", class = structure("signature", package = "methods")))

object = "gausspr":
structure(function (object)
object@fit, class = structure("MethodDefinition", package = "methods"), target = structure("gausspr", .Names = "object", class =

structure("signature", package = "methods")), defined = 
structure("gausspr", .Names = "object", class = structure("signature", 
package = "methods")))

object = "rvm":
structure(function (object)
object@fit, class = structure("MethodDefinition", package = "methods"), target = structure("rvm", .Names = "object", class = structure("signature", package = "methods")), defined = structure("rvm", .Names = "object", class = structure("signature", package = "methods")))

object = "onlearn":
structure(function (object)
object@fit, class = structure("MethodDefinition", package = "methods"), target = structure("onlearn", .Names = "object", class =

structure("signature", package = "methods")), defined = 
structure("onlearn", .Names = "object", class = structure("signature", 
package = "methods")))


and the `party' is over. Is there anything (except agreeing on a common signature) one can do about it?

Best wishes,

Torsten



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Feb 15 20:30:32 2006

This archive was generated by hypermail 2.1.8 : Thu 16 Feb 2006 - 06:35:43 GMT