ConvertMedUnits            package:gdata            R Documentation

_C_o_n_v_e_r_t _m_e_d_i_c_a_l _m_e_a_s_u_r_e_m_e_n_t_s _b_e_t_w_e_e_n _I_n_t_e_r_n_a_t_i_o_n_a_l _S_t_a_n_d_a_r_d (_S_I)
_a_n_d _U_S '_C_o_n_v_e_n_t_i_o_n_a_l' _U_n_i_t_s.

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

     Convert Medical measurements between International Standard (SI)
     and US 'Conventional' Units.

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

     ConvertMedUnits(x, measurement, abbreviation,
                     to = c("Conventional", "SI", "US"),
                     exact = !missing(abbreviation))

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

       x: Vector of measurement values

measurement: Name of the measurement

abbreviation: Measurement abbreviation

      to: Target units

   exact: Logicial indicating whether matching should be exact

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

     Medical laboratories and practitioners in the United States use
     one set of units (the so-called 'Conventional' units) for
     reporting the results of clinical laboratory measurements, while
     the rest of the world uses the International Standard (SI) units. 
     It often becomes necessary to translate between these units when
     participating in international collaborations.

     This function converts between SI and US 'Conventional' units.

     If 'exact=FALSE', 'grep' will be used to do a case-insensitive
     sub-string search for matching measurment names.  If more than one
     match is found, an error will be generated, along with a list of
     the matching entries.

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

     Returns a vector of converted values.  The attribute 'units' will
     contain the target units converted.

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

     Gregory R. Warnes warnes@bst.rochester.edu

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.globalrph.com/conv_si.htm>

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

     The data set 'MedUnits' provides the conversion factors.

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

     data(MedUnits)

     # show available conversions
     MedUnits$Measurement

     # Convert SI Glucose measurement to 'Conventional' units
     GlucoseSI = c(5, 5.4, 5, 5.1, 5.6, 5.1, 4.9, 5.2, 5.5) # in SI Units
     GlucoseUS = ConvertMedUnits( GlucoseSI, "Glucose", to="US" )
     cbind(GlucoseSI,GlucoseUS)

     ## Not run: 
     # See what happens when there is more than one match
     ConvertMedUnits( 27.5, "Creatin", to="US")
     ## End(Not run)

     # To solve the problem do:
     ConvertMedUnits( 27.5, "Creatinine", to="US", exact=TRUE)

