pctCen                 package:NADA                 R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _p_e_r_c_e_n_t_a_g_e _o_f _v_a_l_u_e_s _c_e_n_s_o_r_e_d

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

     'pctCen' is a simple, but convenient, function that calculates the
     percentage of censored values.

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

     pctCen(obs, censored)

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

     obs: A numeric vector of observations.  This includes both
          censored and uncensored observations. 

censored: A logical vector indicating TRUE where an observation in v is
          censored (a less-than value) and FALSE otherwise. 

_D_e_t_a_i_l_s:

     100*(length(obs[censored])/length(obs))

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

     'pctCen' returns a single numeric value representing the
     percentage of values censored in the ``obs" vector.

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

     Lopaka(Rob) Lee <rclee@usgs.gov>

     Dennis Helsel <dhelsel@usgs.gov>

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

     'splitQual', 'ros',

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

         obs      = c(0.5,    0.5,   1.0,  1.5,   5.0,    10,   100)
         censored = c(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)

         pctCen(obs, censored) 

