mdy.date package:survival R Documentation _C_o_n_v_e_r_t _t_o _J_u_l_i_a_n _D_a_t_e_s _D_e_s_c_r_i_p_t_i_o_n: Given a month, day, and year, returns the number of days since January 1, 1960. _U_s_a_g_e: mdy.date(month, day, year, nineteen = TRUE, fillday = FALSE, fillmonth = FALSE) _A_r_g_u_m_e_n_t_s: month: vector of months. day: vector of days. year: vector of years. nineteen: if 'TRUE', year values between 0 and 99 are assumed to be in the 20th century A.D.; otherwise, if 'FALSE', they are assumed to be in the 1st century A.D. fillday: if 'TRUE', then missing days are replaced with 15. fillmonth: if 'TRUE', then a missing month causes the month and day to be set to 7/1. _D_e_t_a_i_l_s: The date functions are particularly useful in computing time spans, such as number of days on test, and similar functions can be found in other statistical packages. The baseline date of Jan 1, 1960 is, of course, completely arbitrary (it is the same one used by SAS). The 'fillday' and 'fillmonth' options are perhaps useful only to the author and a very few others: we sometimes deal with patients whose birth date was in the 1800's, and only the month or even only the year is known. When the interval is greater than 80 years, a filler seems defensible. _V_a_l_u_e: a vector of Julian dates. _R_e_f_e_r_e_n_c_e_s: Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery, B. P. (1992). _Numerical Recipes: The Art of Scientific Computing (Second Edition)_. Cambridge University Press. _S_e_e _A_l_s_o: 'date.mmddyy', 'date.ddmmmyy', 'date.mmddyyyy' _E_x_a_m_p_l_e_s: mdy.date(3, 10, 53) xzt <-1:10 xzy <- as.date(xzt) test <- data.frame(x = xzt, date = xzy) summary(test)