sub-.ts_data: Extract a subset of a time series stored in an object

[.ts_dataR Documentation

Extract a subset of a time series stored in an object

Description

Receives as parameters the variables x, i, j ...

Usage

## S3 method for class 'ts_data'
x[i, j, ...]

Arguments

x

input variable

i

row i

j

column j

...

optional arguments

Value

A new ts_data object

Examples

data(sin_data)
data10 <- ts_data(sin_data$y, 10)
ts_head(data10)
#single line
data10[12,]

#range of lines
data10[12:13,]

#single column
data10[,1]

#range of columns
data10[,1:2]

#range of rows and columns
data10[12:13,1:2]

#single line and a range of columns
#'data10[12,1:2]

#range of lines and a single column
data10[12:13,1]

#single observation
data10[12,1]

daltoolbox documentation built on May 29, 2024, 1:57 a.m.