Displaying 1 result from an estimated 1 matches for "tvec2".
Did you mean:
vec2
2011 Apr 29
1
Handling of irregular time series in lineChart
...l spaced time
series. For example, I have the following code:
library(quantmod)
options(digits.sec=3)
t0 <- as.POSIXct("2010-04-20 09:30:00.000");
tvec1 <- runif(1000,0,1000);
tvec1 <- sort(tvec1);
tvec1 <- t0+tvec1;
t0 <- as.POSIXct("2010-04-20 12:30:00.000");
tvec2 <- runif(1000,0,1000);
tvec2 <- sort(tvec2);
tvec2 <- t0+tvec2;
tvec <- c(tvec1,tvec2);
data <- cumsum(rnorm(length(tvec)));
tseries <- xts(data,tvec);
lineChart(tseries);
There are two clusters of data points around 9:30AM and 12:30PM.
However, when lineChart displays result,...