Data for cleaning          package:epicalc          R Documentation

_D_a_t_a_s_e_t _f_o_r _p_r_a_c_t_i_c_i_n_g _c_l_e_a_n_i_n_g, _l_a_b_e_l_l_i_n_g _a_n_d _r_e_c_o_d_i_n_g

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

     The data come from clients of a family planning clinic.

     For all variables except id: 9, 99, 99.9, 888, 999 are missing
     values

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

     data(Planning)

_F_o_r_m_a_t:

     A data frame with 251 observations on the following 11 variables.

     '_I_D' a numeric vector: ID code

     '_A_G_E' a numeric vector

     '_R_E_L_I_G' a numeric vector: Religion

              1  = Buddhist
              2  = Muslim

     '_P_E_D' a numeric vector: Patient's education level

              1  = none
              2  = primary school
              3  = secondary school
              4  = high school
              5  = vocational school
              6  = university
              7  = other

     '_I_N_C_O_M_E' a numeric vector: Monthly income in Thai Baht

              1  = nil
              2  = < 1,000
              3  = 1,000-4,999
              4  = 5,000-9,999
              5  = 10,000

     '_A_M' a numeric vector: Age at marriage

     '_R_E_A_S_O_N' a numeric vector: Reason for family planning

              1  = birth spacing
              2  = enough children
              3  = other

     '_B_P_S' a numeric vector: systolic blood pressure

     '_B_P_D' a numeric vector: diastolic blood pressure

     '_W_T' a numeric vector: weight (Kg)

     '_H_T' a numeric vector: height (cm)

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

     data(Planning)
     des(Planning)
     # Change var. name to lowercase
     names(Planning) <- tolower(names(Planning)) 
     use(Planning)
     des()
     # Check for duplication of 'id'
     table(id)
     names(table(id))[table(id) > 1]

