forporphyry@hotmail.com
2003-Jul-23 00:48 UTC
[Rd] abs() and negative output from fractions() (PR#3536)
Hi, zeros is output from fractions()>zeros[1] -2 -2/5 1 4/3>abs(zeros)[1] -2 -2/5 1 4/3>is.numeric(zeros)[1] TRUE>abs(zeros[1])[1] -2>as.numeric(zeros)[1] -2.000000 -0.400000 1.000000 1.333333>abs(as.numeric(zeros))[1] 2.000000 0.400000 1.000000 1.333333>version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 7.1 year 2003 month 06 day 16 language R graham lawrence
Thomas Lumley
2003-Jul-23 01:28 UTC
[Rd] abs() and negative output from fractions() (PR#3536)
On Wed, 23 Jul 2003 forporphyry@hotmail.com wrote:> Hi, > > zeros is output from fractions() > > >zeros > [1] -2 -2/5 1 4/3 > >abs(zeros) > [1] -2 -2/5 1 4/3 > >is.numeric(zeros) > [1] TRUE > >abs(zeros[1]) > [1] -2 > >as.numeric(zeros) > [1] -2.000000 -0.400000 1.000000 1.333333 > >abs(as.numeric(zeros)) > [1] 2.000000 0.400000 1.000000 1.333333Why is this a bug? -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley@u.washington.edu University of Washington, Seattle
Duncan Murdoch
2003-Jul-23 03:07 UTC
[Rd] abs() and negative output from fractions() (PR#3536)
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/3The 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. Duncan Murdoch