Re: [R] working with fractions

2007-06-21 Thread Federico Calboli
Muhammad Subianto wrote: > > library(MASS) > > as.fractions(c(0, 0.15, 0.827, .06, 0.266)) > [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 Publi

Re: [R] working with fractions

2007-06-21 Thread Muhammad Subianto
Federico Calboli wrote: > Hi All, > > I am writing a fucntion where I would like to use fractions for all the > (numerous) passages. > > Is there a way of creating an environment *within a fucntion* so that all the > numbers/calculations are fractions? > > Best, > > Fede > > > Maybe like this:

[R] working with fractions

2007-06-21 Thread Federico Calboli
Hi All, I am writing a fucntion where I would like to use fractions for all the (numerous) passages. Is there a way of creating an environment *within a fucntion* so that all the numbers/calculations are fractions? Best, Fede -- Federico C. F. Calboli Department of Epidemiology and Public