From ripley at stats.ox.ac.uk  Wed Jul 23 09:47:09 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed Jul 23 09:47:00 2003
Subject: [Rd] abs() and negative output from fractions() (PR#3536)
In-Reply-To: <e8nrhvoon75dsu40ibcv9rc8cqnuk9r345@4ax.com>
Message-ID: <Pine.LNX.4.44.0307230843350.26690-100000@gannet.stats>

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@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


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