irts-methods             package:tseries             R Documentation

_M_e_t_h_o_d_s _f_o_r _I_r_r_e_g_u_l_a_r _T_i_m_e-_S_e_r_i_e_s _O_b_j_e_c_t_s

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

     Methods for irregular time-series objects.

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

     ## S3 method for class 'irts':
     lines(x, type = "l", ...)
     ## S3 method for class 'irts':
     plot(x, type = "l", plot.type = c("multiple", "single"), 
          xlab = "Time", ylab = NULL, main = NULL, ylim = NULL,
          oma = c(6, 0, 5, 0), ...)
     ## S3 method for class 'irts':
     points(x, type = "p", ...)                    
     ## S3 method for class 'irts':
     print(x, format = "%Y-%m-%d %H:%M:%S", tz = "GMT",
           usetz = TRUE, format.value = NULL, ...)
     ## S3 method for class 'irts':
     time(x, ...)
     ## S3 method for class 'irts':
     value(x, ...)
     ## S3 method for class 'irts':
     x[i, j, ...]

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

       x: an object of class '"irts"'; usually, a result  of a call to
          'irts'.

type, plot.type, xlab, ylab, main, ylim, oma: graphical arguments, see
          'plot', 'points', 'lines', 'par', and 'plot.ts'.

format, tz, usetz: formatting related arguments, see 'format.POSIXct'.

format.value: a string which specifies the formatting of the values
          when printing an irregular time-series  object.
          'format.value' is passed unchanged as argument 'format' to
          the function 'formatC'.

    i, j: indices specifying the parts to extract from an irregular
          time-series object.

     ...: further arguments passed to or from other methods: for
          'lines' passed to 'lines'; for 'plot' passed to 'plot',
          'plot.default', and 'mtext'; for 'points' passed to 'points';
          for 'print' passed to 'formatC'; for 'time', 'value', and
          '[.irts' unused.

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

     'plot' is the method for plotting irregular time-series objects.

     'points' and 'lines' are the methods for drawing a sequence of
     points as given by an irregular time-series object and joining the
     corresponding points with line segments, respectively.

     'print' is the method for printing irregular time-series objects.

     'time' and 'value' are the methods for extracting the sequence of
     times and the sequence of values of an irregular time-series
     object.

     '[.irts' is the method for extracting parts of irregular
     time-series objects.

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

     For 'time' an object of class '"POSIXct"' representing the
     sequence of times. For 'value' a vector or matrix representing the
     sequence of values. 

     For '[.irts' an object of class '"irts"' representing the
     extracted part.

     For 'plot', 'points', 'lines', and 'print' the irregular
     time-series object.

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

     A. Trapletti

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

     'irts', 'irts-functions'

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

     n <- 10
     t <- cumsum(rexp(n, rate = 0.1))
     v <- rnorm(n)
     x <- irts(t, v)

     x
     time(x)
     value(x)
     plot(x)
     points(x)

     t <- cumsum(c(t[1], rexp(n-1, rate = 0.2)))
     v <- rnorm(n, sd = 0.1)
     x <- irts(t, v)

     lines(x, col = "red")
     points(x, col = "red")

     # Multivariate
     t <- cumsum(rexp(n, rate = 0.1))
     u <- rnorm(n)
     v <- rnorm(n)
     x <- irts(t, cbind(u, v))

     x
     x[,1]
     x[1:3,]
     x[1:3,1]
     plot(x)

