fractions {rational} | R Documentation |
fractions(x, ...)
x |
Array to be approximated. |
... |
Optional additional parameters to be passed to rat(x, ...) |
A character array of the same shape as x
of rational
approximations in fraction form. e.g 0.28571429 -> "2/7".
# somewhat pointless.. x <- rep(1:7,1:7)/7 #compare: table(x) #with: table(fractions(x))