[Rd] abs() and negative output from fractions() (PR#3536)

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jul 23 09:47:09 MEST 2003


On Tue, 22 Jul 2003, Duncan Murdoch wrote:

> On Wed, 23 Jul 2003 00:49:05 +0200 (MET DST), you wrote:
> 
> >Hi,
> >
> >zeros is output from fractions()
> >
> >>zeros
> >[1]   -2 -2/5    1  4/3
> >>abs(zeros)
> >[1]   -2 -2/5    1  4/3
> 
> The fractions() function is presumably the one from MASS; questions
> about contributed packages (even recommended ones) should go to the
> package maintainer.  They are not R bugs.

This is not even a VR bug: no one said abs() is implemented for fractions, 
and it is not.  From the help page:

     Arithmetic operations on `"fractions"' objects are possible.

and abs() is not such an operation.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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



More information about the R-devel mailing list