On Thu, Dec 10, 2009 at 3:46 AM, Karl Ove Hufthammer <k...@huftis.org> wrote:
> On Wed, 9 Dec 2009 19:20:47 -0600 Peng Yu <pengyu...@gmail.com> wrote:
>> Is there a way to figure out which of these variants is actually
>> dispatched to when I call split? I know that if the argument is of the
>> type data.frame, split.data.frame will be called? Is it the case that
>> if the argument is not of type data.frame, Date or POSIXct,
>> split.default will be called?
>
> Yes. See ?UseMethod

I tried it. But I'm not sure how to use it. Would you please give me a
working example?

> UseMethod('print')
Error in UseMethod("print") :
  'UseMethod' used in an inappropriate fashion
> UseMethod('print', 1:2)
Error in UseMethod("print", 1:2) :
  'UseMethod' used in an inappropriate fashion

______________________________________________
R-help@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.

Reply via email to