as.date               package:survival               R Documentation

_C_o_e_r_c_e _D_a_t_a _t_o _D_a_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Converts any of the following character forms to a Julian date:
     8/31/56, 8-31-1956, 31 8 56, 083156, 31Aug56, or August 31 1956.

_U_s_a_g_e:

     as.date(x, order = "mdy", ...)

_A_r_g_u_m_e_n_t_s:

       x: input data vector.

   order: if x is character, defines the order in which the terms are
          assumed to appear in a xx/xx/xx date.  The default is
          month/day/year; any permutation of mdy is legal.

     ...: if x is character, then any other arguments from 'mdy.date()'
          can be used as well.

_D_e_t_a_i_l_s:

     If 'x' is numeric, then 'floor(x)' is returned, e.g.,
     'as.date(35)' is the same as 'as.date(35.2)' and gives 'Feb 2,
     1960'.  If 'x' is character, the program attempts to parse it.

_V_a_l_u_e:

     For each date, the number of days between it and January 1, 1960.
     The date will be missing if the string is not interpretable.

_S_e_e _A_l_s_o:

     'mdy.date', 'date.mmddyy',  'date.ddmmmyy'

_E_x_a_m_p_l_e_s:

     as.date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"))

