itsFile: File Operations for Irregular Time-Series Objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1
2
3
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

formatting related arguments, see format.POSIXct.

tz

what timezone the its is in

usetz

whether to include the tzone information in the saved file

header

see read.csv

col.names, sep

see write.table

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

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, itsFile, itsLags itsJoin itsTimes itsSubset itsFin itsInterp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
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)

## End(Not run)

armstrtw/its documentation built on May 10, 2019, 1:42 p.m.