[R] difficulties with "setMethod"

Nils Rüfenacht nils.ruefenacht at bluewin.ch
Tue Jul 17 22:40:14 CEST 2007


Dear all!

I do definetley have some difficulties. Here is my code:

> setMethod("write",
+             signature(object = "KMatrix", path = "character"),
+             function(object,path){
+             write.table(object at data,path,row.names=FALSE, sep = "\t")
+             }            
+             )
error in match.call(fun, fcall) : unused argument(s) (object =
"KMatrix", path = "character")
>

"KMatrix" is an extension of some data.frame object, i.e. it's a
data.frame (KMatrix at data) with some additional slots (e.g. KMatrix at Size)

What's wrong with my setMethod? 

Kind regards,
nils



More information about the R-help mailing list