Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read.write.fts

Read / Write Files


Description

Read / Write files to csv or .RDS format

Usage

read.csv.fts(file, date.column=1, date.format="%Y-%m-%d",
date.convert.fun=as.Date, ...)
write.csv.fts(x, file, ...)

Arguments

x

An Fts object

file

filename of file to read/write

date.column

column that = the dates are in

date.format

the format of the date strings

date.convert.fun

function to convert dates into desired index class

...

further arguments to underlying read/write functions

Value

a Fts object for functions that read data

Author(s)

Whit Armstrong

Examples

x <- fts(index=seq(from=Sys.Date(),by="days",length.out=100),data=1:100)
colnames(x) <- "big.ass.black.dog"

csv.fname <- paste(tempfile(),".csv",sep="")
write.csv.fts(x,csv.fname)
y.csv <- read.csv.fts(csv.fname)

all.equal(x,y.csv)

fts

R Interface to 'tslib' (a Time Series Library in C++)

v0.9.9.2
GPL-3
Authors
Whit Armstrong <armstrong.whit@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.