Print number as reduced fraction in R

前端 未结 1 1631
滥情空心
滥情空心 2020-12-13 17:46

On my old beat-up TI-83 I can get a reduced fraction representation of a rational real number with the following syntax.

.14>Frac
               7/50


        
相关标签:
1条回答
  • 2020-12-13 18:13

    fractions() in the MASS package does just that:

    > library(MASS)
    > fractions(.14)
    [1] 7/50
    
    0 讨论(0)
提交回复
热议问题