Learn R Programming

tframe (version 2012.3-1)

selectSeries: Extract a Subset of Series

Description

Extract a subset of series from a tframed object.

Usage

selectSeries(x, series = seqN(nseries(x)))
    ## S3 method for class 'default':
selectSeries(x, series = seqN(nseries(x)))
    ## S3 method for class 'ts':
selectSeries(x, series = seqN(nseries(x)))

Arguments

x
A tframed object.
series
The subset of series to retain.

Value

  • A tframed object.

Details

This is like [ , , drop=FALSE] but retains class, series name and tframe information. It also provides a methods which works with multivariate series which are not matrices (e.g. tfPADIdata).

See Also

seriesNames

Examples

Run this code
z <- selectSeries(matrix(rnorm(1000), 100,10), series=c(2, 5, 6))

Run the code above in your browser using DataLab