[R] fractional calculations

Federico Calboli f.calboli at imperial.ac.uk
Mon Jun 25 14:51:16 CEST 2007


Henrique Dallazuanna wrote:
> require(MASS)
> ?as.fractions
> as.fractions(1/2+1/8)

I thought that as.fractions did transform the fractions *first* into floats and 
*then* found the rational approssimation (a passage I'd rather avoid):

fractions                package:MASS                R Documentation

Rational Approximation

Description:

      Find rational approximations to the components of a real numeric
      object using a standard continued fraction method.

/F
-- 
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG

Tel  +44 (0)20 7594 1602     Fax (+44) 020 7594 3193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com



More information about the R-help mailing list