couldn't find FUN
Prof Brian D Ripley
Fri, 21 Aug 1998 18:37:01 +0100 (BST)
On Fri, 21 Aug 1998, Paul Gilbert wrote:
> The call to sweep in this function which was working in 0.62.2 is giving me
> trouble in 62.3:
The call is invalid:
Sweep out Array Summaries
sweep(x, MARGIN, STATS, FUN="-", ...)
x: an array.
If you call sweep on a data frame, as in
> sweep(crimes, 2, "-")
it does not work: it should not have done so before. On the other hand, in
0.62.2, valid arithmetic operations on data frames gave matrices,
which helped your illegal example but were incorrect on legal ones.
You need an as.matrix in your code, I believe.
This example also fails in S.
Brian D. Ripley, email@example.com
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org