its (version 1.0.3)

itsFile: 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=",",split=FALSE,...)

Arguments

filename
filename
x
an object of class "its"
format, informat, outformat, tz, usetz
formatting related arguments, see format.POSIXct.
header
col.names, sep
split
when columns exceed 255 in number, flags for splitting into numbered subfiles
...
further arguments passed to or from other methods: for readcsvIts passed to read.csv; for writecsvIts passed to write.table

Value

  • For readcsvIts a matrix

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.

See Also

ts, POSIXct, itsFile, itsLags itsJoin itsTimes itsSubset itsFin itsDisp itsInfo itsCumdif itsArith itsInterp

Examples

Run this code
b <- newIts(1:30,ncol=3)
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)

Run the code above in your browser using DataLab