julian2date             package:epitools             R Documentation

_C_o_n_v_e_r_t _a _j_u_l_i_a_n _d_a_t_e _i_n_t_o _s_t_a_n_d_a_r_d _a _d_a_t_e _f_o_r_m_a_t

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

     Convert a julian date into a standard calendar date format

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

     julian2date(x)

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

       x: julian date; that is, the number of days since day 0 (default
          is 1970-01-01)

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

     In R, the 'julian' function converts a date-time object into a
     Julian date: the number of day since day 0 (default is
     1970-01-01). However, there is no function, without loading
     another package, that converts a Julian date back into a date
     object. The 'julian2date' function does this conversion.

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

     Return standard calendar date format.

_N_o_t_e:

     Visit <URL: http://www.epitools.net> for the latest.

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

     Tomas Aragon, aragon@berkeley.edu, <URL: http://www.medepi.com>

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

     none

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

     'as.Date', 'julian'

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

     mydates <- c("1/1/04", "1/2/04", "1/7/04", "1/14/04", "8/18/04");
     mydates <- as.Date(mydates, format = "%m/%d/%y")
     mydates
     myjulian <- julian(mydates)
     myjulian
     julian2date(myjulian)

