

fractions(rational)                          R Documentation

_R_a_t_i_o_n_a_l _A_p_p_r_o_x_i_m_a_t_i_o_n_s _t_o _i_n _F_r_a_c_t_i_o_n _F_o_r_m

_U_s_a_g_e_:

     fractions(x, ...)

_A_r_g_u_m_e_n_t_s_:

       x: Array to be approximated.

     ...: Optional additional parameters to be passed to
          rat(x, ...)

_V_a_l_u_e_:

     A character array of the same shape as `x' of rational
     approximations in fraction form.  e.g 0.28571429 ->
     "2/7".

_S_e_e _A_l_s_o_:

     `rational', `rat'.

_E_x_a_m_p_l_e_s_:

     # somewhat pointless..
         x <- rep(1:7,1:7)/7
     #compare:
         table(x)
     #with:
         table(fractions(x))

