Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

Re: [R] do.call("+", ...)

Prof Brian Ripley

2006-11-17

Replies:

On Fri, 17 Nov 2006, Duncan Murdoch wrote:

[...]

> By the way, another complaint is that sum() is supposed to be generic,
> but you can't define a sum.matrix() method so that sum(a,b,c) does the
> same as a+b+c when a is a matrix. (This would probably be a bad idea
> because people may be relying on the current behaviour, but R tries not
> to prevent people from testing out bad ideas.)

In this case it does, and this is as documented in ?Summary, referred to
from ?sum.

--
Brian D. Ripley,            ripley@(protected)
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford,         Tel: +44 1865 272861 (self)
1 South Parks Road,              +44 1865 272866 (PA)
Oxford OX1 3TG, UK           Fax: +44 1865 272595

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.