Vector-class-leftovers: Vector objects (old man page)
Description
  IMPORTANT NOTE - 4/29/2014: This man page is being refactored. Most of
  the things that used to be documented here have been moved to the man
  page for Vector objects located in the S4Vectors
  package.
Evaluation
In the following code snippets, x is a Vector object. 
    - 
      with(x, expr): Evaluatesexprwithinas.env(x)viaeval(x).
- 
      eval(expr, envir, enclos=parent.frame()): Evaluatesexprwithinenvir, whereenviris coerced to
      an environment withas.env(envir, enclos). Theexpris first processed withbquote, such that any
      escaped symbols are directly resolved in the calling frame.
Convenience wrappers for common subsetting operations
In the code snippets below, x is a Vector object or regular R vector
  object. The R vector object methods for window are defined in this
  package and the remaining methods are defined in base R. 
    - 
      window(x, start=NA, end=NA, width=NA, frequency=NULL, delta=NULL, ...):
      Extract the subsequence window from the Vector object using:
        - start,- end,- width
- The start, end, or width
          of the window. Two of the three are required.
- frequency,- delta
- Optional arguments that specify
          the sampling frequency and increment within the window.
 In general, this is more efficient than using"["operator.
- 
      window(x, start=NA, end=NA, width=NA) <- value:
      Replace the subsequence window specified on the left (i.e. the
      subsequence inxspecified bystart,endandwidth) byvalue.valuemust either be of classclass(x), belong to a
      subclass ofclass(x), or be coercible toclass(x)or a
      subclass ofclass(x).
      The elements ofvalueare repeated to create a Vector with the
      same number of elements as the width of the subsequence window it is
      replacing.
- 
      head(x, n = 6L):
      Ifnis non-negative, returns the first n elements of the Vector
      object.
      Ifnis negative, returns all but the lastabs(n)elements
      of the Vector object.
- 
      tail(x, n = 6L):
      Ifnis non-negative, returns the last n elements of the Vector
      object.
      Ifnis negative, returns all but the firstabs(n)elements
      of the Vector object.
- 
      rev(x):
      Return a new Vector object made of the original elements in the reverse
      order.
- 
      rep(x, times, length.out, each),rep.int(x, times):
      Repeats the values inxthrough one of the following conventions:
        - times
- Vector giving the number of times to repeat each
          element if of length length(x), or to repeat the whole vector
          if of length 1.
- length.out
- Non-negative integer. The desired length of
          the output vector.
- each
- Non-negative integer.  Each element of xis
          repeatedeachtimes.
 
- 
      subset(x, subset):
      Return a new Vector object made of the subset using logical vectorsubset, where missing values are taken as FALSE.
Combining
In the code snippets below, x is a Vector object. 
    - mstack(..., .index.var = "name"): A variant of- stack, where the list is taken as the list of
      arguments in- ..., each of which should be a- Vectoror- vector(mixing the two will not work).
Looping
In the code snippets below, x is a Vector object. 
    - 
      tapply(X, INDEX, FUN = NULL, ..., simplify = TRUE):
      Like the standardtapplyfunction defined in the
      base package, thetapplymethod for Vector objects applies a
      function to each cell of a ragged array, that is to each (non-empty)
      group of values given by a unique combination of the levels of certain
      factors.
- 
      shiftApply(SHIFT, X, Y, FUN, ..., OFFSET = 0L, simplify = TRUE, verbose = FALSE):
      Letibe the indices inSHIFT,X_i = window(X, 1 + OFFSET, length(X) - SHIFT[i]), andY_i = window(Y, 1 + SHIFT[i], length(Y) - OFFSET). Calculates
      the set ofFUN(X_i, Y_i, ...)values and return the results in a
      convenient form:
        - SHIFT
- A non-negative integer vector of shift values.
- X,- Y
- The Vector or R vector objects to shift.
- FUN
- The function, found via match.fun, to be
          applied to each set of shifted vectors.
- ...
- Further arguments for FUN.
- OFFSET
- A non-negative integer offset to maintain throughout
          the shift operations.
- simplify
- A logical value specifying whether or not the
          result should be simplified to a vector or matrix if possible.
- verbose
- A logical value specifying whether or not to
          print the iindices to track the iterations.
 
- 
      aggregate(x, by, FUN, start = NULL, end = NULL, width = NULL,
                      frequency = NULL, delta = NULL, ..., simplify = TRUE)):
      Generates summaries on the specified windows and returns the result in a
      convenient form:
        - by
- An object with start,end, andwidthmethods.
- FUN
- The function, found via match.fun, to be
          applied to each window ofx.
- start,- end,- width
- the start, end, or width
          of the window. If byis missing, then must supply two of the
          three.
- frequency,- delta
- Optional arguments that specify
          the sampling frequency and increment within the window.
- ...
- Further arguments for FUN.
- simplify
- A logical value specifying whether or not the
          result should be simplified to a vector or matrix if possible.
 
Coercion
    - 
      as.list(x): coerce a Vector to a list, where theith
      element of the result corresponds tox[i].
See Also
  The Vector class defined and documented in the
  S4Vectors package.