reading and writing related arguments, see
read.table and write.table.
format.value
a string which specifies the formatting of the
values when writing an irregular time-series object to a
file. format.value is passed unchanged as argument
format to the function formatC.
...
further arguments passed to or from other methods: for
approx.irts passed to approx; for
read.irts passed to read.table; for
write.irts passed to data.frame.
Details
daysecond and weekday return the number of seconds since
midnight (the same day) and the weekday as a decimal number (0-6,
Sunday is 0), respectively.
is.businessday and is.weekend test which entries of an
irregular time-series object are recorded on business days and
weekends, respectively.
approx.irts interpolates an irregularly spaced time-series at
prespecified times.
read.irts is the function to read irregular time-series
objects from a file.
write.irts is the function to write irregular time-series
objects to a file.
Value
For daysecond and weekday a vector of decimal numbers
representing the number of seconds and the weekday, respectively.
For is.businessday and is.weekend a vector of
"logical" representing the test results for each time.
For approx.irts, read.irts and write.irts an
object of class "irts".
Author(s)
A. Trapletti
See Also
irts,
irts-methods
Examples
n <- 10
t <- cumsum(rexp(n, rate = 0.1))
v <- rnorm(n)
x <- irts(t, v)
daysecond(x)
weekday(x)
is.businessday(x)
is.weekend(x)
x
approx.irts(x, seq(ISOdatetime(1970, 1, 1, 0, 0, 0, tz = "GMT"),
by = "10 secs", length = 7), rule = 2)
## Not run:
file <- tempfile()
# To write an irregular time-series object to a file one might use
write.irts(x, file = file)
# To read an irregular time-series object from a file one might use
read.irts(file = file)
unlink(file)
## End(Not run)