decimal2fraction | R Documentation |
convert a decimal-number into fraction
decimal2fraction(decimal, period = 0)
decimal |
the decimal number to be converted, given without an repeating ending |
period |
if the decimal places have an repeating ending (period), set the period here. See examples. #' |
a character string with the fraction.
## converting 23.4323
decimal2fraction(23.4323)
## converting a number with decimal period, e.g. 12.12344444444444444444
decimal2fraction(12.123, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.