[R] working with fractions

Federico Calboli f.calboli at imperial.ac.uk
Thu Jun 21 20:04:55 CEST 2007


Muhammad Subianto wrote:

>  > library(MASS)
>  > as.fractions(c(0, 0.15, 0.8266667, .066666, 0.2666666))
> [1]     0  3/20 62/75  1/15  4/15

Seems to make things a bit too slow, even though I get a good increase in precision.

Fede

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