[R] setMethod does not work in Window 7??

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Jun 4 15:04:23 CEST 2010


Wrong R version? Maybe loaded some other plot definition before your 
experiment? Works for me in R-2.11.1.

Uwe Ligges


Am 03.06.2010 23:05, schrieb Fang, Jianwen:
> I am developing a S4 class but have had trouble to make setMethod work
> in Window 7.  I tested an example found  in the setMethod manual:
>
>
>
>   >  require(graphics)
>
>> setMethod("plot", signature(x="track", y="missing"),
>
> +   function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...)
>
> + )
>
>
>
> It gave me:
>
>
>
> Error in setMethod("plot", signature(x = "track", y = "missing"),
> function(x,  :
>
>    unused argument(s) (function(x, y, ...) plot(slot(x, "x"), slot(x,
> "y"), ...))
>
>
>
> It works perfectly fine in Linux.   Does anybody know why?
>
>
>
> Thanks in advance!
>
> JF
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list