format.pval               package:base               R Documentation

_F_o_r_m_a_t _P _V_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'format.pval' is intended for formatting p-values.

_U_s_a_g_e:

     format.pval(pv, digits = max(1, getOption("digits") - 2),
                 eps = .Machine$double.eps, na.form = "NA")

_A_r_g_u_m_e_n_t_s:

      pv: a numeric vector.

  digits: how many significant digits are to be used.

     eps: a numerical tolerance: see Details.

 na.form: character representation of 'NA's.

_D_e_t_a_i_l_s:

     'format.pval' is mainly an auxiliary function for
     'print.summary.lm' etc., and does separate formatting for fixed,
     floating point and very small values; those less than 'eps' are
     formatted as '"< [eps]"' (where '[eps]' stands for 'format(eps,
     digits)').

_V_a_l_u_e:

     A character vector.

_E_x_a_m_p_l_e_s:

     format.pval(c(stats::runif(5), pi^-100, NA))
     format.pval(c(0.1, 0.0001, 1e-27))

