math                 package:fSeries                 R Documentation

_M_a_t_h_e_m_a_t_i_c_a_l _t_i_m_e_S_e_r_i_e_s _O_p_e_r_a_t_i_o_n_s

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

     A collection and description of functions  and methods dealing
     with mathematical timeSeries operations .         

       'Ops.timeSeries'  S3: Arith method for a 'timeSeries' object,
       'abs'             Returns absolute values of a 'timeSeries' object,
       'sqrt'            Returns square root of a 'timeSeries' object,
       'exp'             Returns the exponential values of a 'timeSeries' object,
       'log'             Returns the logarithm of  a 'timeSeries' object,
       'sign'            Returns the signs of a 'timeSeries' object,
       'diff'            Differences a 'timeSeries' object,
       'scale'           Centers and/or scales a 'timeSeries' object,
       'quantile'        Returns quantiles of an univariate 'timeSeries'.

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

     ## S3 method for class 'timeSeries':
     Ops(e1, e2)
     ## S3 method for class 'timeSeries':
     abs(x)
     ## S3 method for class 'timeSeries':
     sqrt(x)
     ## S3 method for class 'timeSeries':
     exp(x)
     ## S3 method for class 'timeSeries':
     log(x, base = exp(1))
     ## S3 method for class 'timeSeries':
     sign(x)
     ## S3 method for class 'timeSeries':
     diff(x, lag = 1, diff = 1, trim = FALSE, pad = NA, ...)
     ## S3 method for class 'timeSeries':
     scale(x, center = TRUE, scale = TRUE)
     ## S3 method for class 'timeSeries':
     quantile(x, ...)

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

    base: [log] - 
           a positive number. The base with respect to which logarithms
          are computed. Defaults to 'e=exp(1)'. 

center, scale: [scale] - 
           either a logical value or a numeric vector of length equal
          to the number of columns of 'x'. 

    diff: an integer indicating the order of the difference. By default
          1. 

  e1, e2: [Ops] - 
              two objects of class 'timeSeries'. 

     lag: an integer indicating which lag to use. By default 1. 

     pad: [diffSeries] - 
           which value should get the padded values? By default 'NA'.
          Another choice often used would be zero. 

    trim: a logical value. By default 'TRUE', the first missing 
          observation in the return series will be removed.  

       x: an object of class 'timeSeries'. 

     ...: arguments to be passed. 

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

     returns the value from a mathematical or logical operation
     operating on objects of class 'timeSeries', or the value computed
     by a mathematical function.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## data - 
        # Create an artificial timeSeries object:
        myFinCenter <<- "GMT"
        charvec = timeCalendar()
        set.seed(4711)
        data = matrix(exp(cumsum(rnorm(12, sd = 0.1))))
        TS = timeSeries(data, charvec, units = "TS")
        TS

     ## Ops | +/- * ^ ...
        # Mathematical Operations:
        TS^2
        TS[2:4]
        OR = returnSeries(TS)
        OR
        OR > 0

