write.xts: Write an xts object using the date format as rownames

View source: R/functions.r

write.xtsR Documentation

Write an xts object using the date format as rownames

Description

Writing an xts object to a file using its date format as rownames instead of the numerical values of the date

Usage

write.xts(x, file = "", format = NULL, fmt = NULL, quote = FALSE, ...)

Arguments

x

xts object

file

either a character string naming a file or a connection open for writing. "" indicates output to the console.

format

format-style argument for formatting the date/time

quote

logical. Should characterers be encapsulated in ""?

...

Additonal arguments passed to write.table

FMT

character string passed on to sprintf for formatting numerical values. If NULL, no special format is used.

Author(s)

Simon Frey

See Also

read.xts

Examples

    ### do not run
    data("runoff")
    write.xts(runoff, file = tempfile())
    write.xts(runoff, format = "%d.%m.%Y %H:%M")
    write.xts(runoff, fmt = "%5.1f")

freysimon/TigeR documentation built on Feb. 3, 2024, 2:32 a.m.