1) Import data file



1) Import data file.

lynx.column.txt or lynx.row.txt

2) Convert data.frame to a vector (or a matrix for the case of multivariate TS)

data = as.vector(lynx.column[,1])

data = as.vector(lynx.row[1,])

3)Create TS

Basic functions :

1. rts() - Defines a univariate or multivariate regularly spaced time series

USAGE:

rts(x = NA, start = 1, deltat = 1, frequency = 1, end = , units = NULL, names = NULL, eps = .Options$ts.eps)

EXAMPLES:

lynx.rts = rts(x = data, start = c(1990, 2), frequency=12) #deltat = 1/12 = 1 month

x ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download