num2str              package:clim.pact              R Documentation

_C_o_n_v_e_r_t _n_u_m_b_e_r_s _t_o _s_t_r_i_n_g _a_n_d _f_o_r_m_a_t

_D_e_s_c_r_i_p_t_i_o_n:

     Convert numbers to string and format. Similar to FORTRAN 'F8.2'
     format statement.

_U_s_a_g_e:

     num2str(x,dec=2,f.width=NULL,d.point=".")

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

       x: Real numbers.

     dec: number of decmal points.

 f.width: width of field.

 d.point: character marking the decimal point.

     \value{string.} \author{R.E. Benestad}

_V_a_l_u_e:

     string.

_A_u_t_h_o_r(_s):

     R.E. Benestad

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

     print(num2str(c(1,23.4282,-3.14),dec=3))
     #[1] "1.000"  "23.428" "-3.140"

