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

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Fri, 04 Jun 2010 15:04:23 +0200

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.



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. Received on Fri 04 Jun 2010 - 13:12:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Jun 2010 - 13:20:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive