TimeSeriesSubsettings        package:fSeries        R Documentation

_t_i_m_e_S_e_r_i_e_s _S_u_b_s_e_t_t_i_n_g

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

     A collection and description of functions  and methods for
     subsetting timeSeries objects.          

       '"["'       "[" method for a 'timeSeries' object,
       'window'    Windows a piece from a 'timeSeries' object,
       'cut'       A no longer used synonyme for window,
       'head'      Returns the head of a 'timeSeries' object,
       'tail'      Returns the tail of a 'timeSeries' object,
       'outliers'  Removes outliers from a 'timeSeries' object.

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

     ## S3 method for class 'timeSeries':
     x[i = min(1, nrow(x@Data)):nrow(x@Data), 
         j = min(1, ncol(x@Data)):ncol(x@Data)]
     ## S3 method for class 'timeSeries':
     window(x, from, to, ...)
     ## S3 method for class 'timeSeries':
     head(x, n = 6, recordIDs = FALSE, ...)
     ## S3 method for class 'timeSeries':
     tail(x, n = 6, recordIDs = FALSE, ...)
     ## S3 method for class 'timeSeries':
     outlier(x, sd = 10, complement = TRUE, ...)

     ## S3 method for class 'timeSeries':
     cut(x, from, to, ...)

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

complement: [outlierSeries] - 
           a logical flag, should the outler series or its complement
          be returns, by default 'TRUE' which returns the series free
          of outliers. 

from, to: starting date and end date, 'to' must be after 'from'. 

    i, j: ["["] - 
            index arguments used for subsettings. 

       n: [head][tail] - 
           an integer specifying the number of lines to be returned. 
          By default 'n=6'. 

recordIDs: [head][tail] - 
           a logical value. Should the 'recordIDs' returned together
          with the data matrix and time series positions? 

      sd: [outlierSeries] - 
           a numeric value of standard deviations, e.g. 10 means that
          values larger or smaller tahn ten  times the standard
          deviation will be removed from the series. 

       x: an object of class 'timeSeries'. 

     ...: arguments passed to other methods. 

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

     all functions return an object of class 'timeSeries'.

_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
        
     ## "[" - 
        tS[1:3, ]
            
     ## head - 
        head(tS)

