its-file {its}R Documentation

File Operations for Irregular Time-Series Objects

Description

File read and write operations for objects of class "its".

Usage

readcsvIts(filename,informat=its.format(),outformat=its.format(),tz="",
usetz=FALSE,header=TRUE,...)
writecsvIts(x,filename,format=its.format(),tz="",usetz=FALSE,col.names=NA,
sep=",",...)

Arguments

filename filename
x an object of class "its"
format, informat, outformat, tz, usetz formatting related arguments, see format.POSIXct.
header see read.csv
col.names, sep see write.table
... further arguments passed to or from other methods: for readcsvIts passed to read.csv; for writecsvIts passed to write.table

Details

readcsvIts reads from a .csv file to a matrix. The first column is assumed to contain dates in text format specified by informat, which can optionally be reformatted into the text format outformat. Both of these formats default to the format specified by its.format. To convert the matrix to an its, use its (see example)

writecsvIts write an irregular time-series object to a text file.

Value

For readcsvIts a matrix

Author(s)

Giles Heywood

See Also

ts, POSIXct, its-file, its-lags its-join its-times its-subset its-fin its-disp its-info its-cumdif its-arith

Examples


a <- matrix(c(seq(by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3)
b <- as.its(a)
fname <- tempfile()
# To write an irregular time-series object to a file one might use
writecsvIts(b,filename=fname)
# To read an irregular time-series object from a file one might use
its(readcsvIts(filename=fname))
unlink(fname)


[Package Contents]