> is there a function in R that allows me to work with fractions without 
> transforming them to floats (or whatever) in between?
>
>   

You could use the ryacas (CAS) package:
http://code.google.com/p/ryacas/
and/or
http://cran.r-project.org/doc/vignettes/Ryacas/Ryacas.pdf

e.g:
> library(Ryacas)
> yacas(expression((1/2 + 1/8) * 1/2 ))
[1] "Starting Yacas!"
expression(5/16)
>


Stefan

> Something that would calculate something like:
>
> (1/2 + 1/8) * 1/2 = 5/16
>
> without ever transforming to 0.5 and 0.125?
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to