import.ts: Import Time Series from X-13 Data Files

Description Usage Arguments Value See Also Examples

View source: R/import.spc.R

Description

Utility function to read time series from X-13 data files. A call to import.ts is constructed and included in the output of import.spc().

Usage

1
2
3
4
5
6
7
import.ts(
  file,
  format = "datevalue",
  start = NULL,
  frequency = NULL,
  name = NULL
)

Arguments

file

character, name of the X-13 file which the data are to be read from

format

a valid X-13 file format as described in 7.15 of the X-13 manual: "datevalue", "datevaluecomma", "free", "freecomma", "x13save", "tramo" or an X-11 or Fortran format.

start

vector of length 2, time of the first observation (only for formats "free" and "freecomma" and the Fortran formats.)

frequency

the number of observations per unit of time (only for formats "free", "freecomma" and the X-11 or Fortran formats.)

name

(X-11 formats only) name of the series, to select from a file with multiple time series. Omit if you want to read all time series from an X-11 format file.

Value

an object of class ts or mts

See Also

import.spc(), for importing X-13 .spc files.

seas() for the main function of seasonal.

Examples

1
2
3
4
tdir <- tempdir()
seas(x = AirPassengers, dir = tdir)
import.ts(file.path(tdir, "iofile.dta"))
import.ts(file.path(tdir, "iofile.rsd"), format = "x13save")

seasonal documentation built on Sept. 18, 2021, 5:06 p.m.