TimeDateCoercion          package:fCalendar          R Documentation

_t_i_m_e_D_a_t_e _C_l_a_s_s, _C_o_e_r_c_i_o_n _a_n_d _T_r_a_n_s_f_o_r_m_a_t_i_o_n

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

     A collection and description of functions and  methods for
     coercion and transformation of  objects of class 'timeDate'. 

     The functions are:

       'as.timeDate.POSIXt'      Returns a 'POSIX' object as 'timeDate' object,
       'as.timeDate.Date'        Returns a 'POSIX' object as 'timeDate' object,
       'as.character.timeDate'   Returns a 'timeDate' object as character string,
       'as.data.frame.timeDate'  Returns a 'timeDate' object as data frame,
       'as.POSIXct.timeDate'     Returns a 'timeDate' object as POSIXct object,
       'julian.timeDate'         Returns Julian day counts since 1970-01-01,
       'atoms.timeDate'          Returns date/time atoms from a 'timeDate' object,
       'months.timeDate'         Extract months atom from a 'timeDate' object.

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

     ## Default S3 method:
     as.timeDate(x, zone = myFinCenter, FinCenter = myFinCenter)
     ## S3 method for class 'POSIXt':
     as.timeDate(x, zone = myFinCenter, FinCenter = myFinCenter)
     ## S3 method for class 'Date':
     as.timeDate(x, zone = myFinCenter, FinCenter = myFinCenter) 

     ## S3 method for class 'timeDate':
     as.character(x, ...)
     ## S3 method for class 'timeDate':
     as.double(x, units = c("auto", "secs", "mins", "hours", "days", "weeks"), ...)
     ## S3 method for class 'timeDate':
     as.data.frame(x, ...)
     ## S3 method for class 'timeDate':
     as.POSIXct(x, tz = "")
     ## S3 method for class 'timeDate':
     as.POSIXlt(x, tz = "")
     ## S3 method for class 'timeDate':
     as.Date(x, method = c("trunc", "round", "next"), ...)

     ## S3 method for class 'timeDate':
     julian(x, origin = timeDate("1970-01-01"), units = c("auto", 
         "secs", "mins", "hours", "days", "weeks"), zone = NULL, FinCenter = NULL, ...)
     ## S3 method for class 'timeDate':
     atoms(x, ...)
     ## S3 method for class 'timeDate':
     months(x, abbreviate = NULL)

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

abbreviate: [months] - 
           currently not used. 

      tz: inputs the time zone to POSIX objects, i.e. the time zone, 
          'zone', or financial center string, 'FinCenter',  as used by
          'timeDate' objects. 

FinCenter: a character with the the location of the   financial center
          named as "continent/city".  

  method: a character string denoting the method how to determine the
          dates. 

  origin: a length-one object inheriting from class '"timeDate"'
          setting the origin for the julian counter. 

   units: a character string denoting the date/time units in which the 
          results are desired. 

       x: an object of class 'timeDate'. 

    zone: the time zone or financial center where the data were
          recorded. 

     ...: arguments passed to other methods. 

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

     'as.character'
      'as.data.frame' 
      return a 'timeDate' object trnasformed into a character or a data
     frame formatted object. 

     'as.POSIXct' 
      return a 'timeDate' object transformed into a POSIX type
     formatted object. 

     'julian' 
      return a 'timeDate' object as a Julian count. 

     'atoms'
      'months' 
      extrac from a 'timeDate' object the calendar atoms, i.e, the
     year, month, day, and optionally hour, minute and second.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     'timeDateClass'

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

     ## as.character 
        tD = timeDate()
        as.character(tD)
        
     ## as.data.frame -
        as.data.frame(tD)
        
     ## as.POSIXct -  
        as.POSIXct(tD)

     ## julian -
        tC = timeCalendar()
        julian(tC)[1:3]
        
     ## atoms -
        atoms(tC)
        
     ## months -
        months(tC)

