Displaying 1 result from an estimated 1 matches for "ensuredate".
2012 Sep 16
1
possible TZ bug in parseISO8601 - "Error in if (length(c(year, month, day, hour, min, sec)) == 6 && c(year, : [...]"
...w Close
2007-10-10 1564.72 1576.09 1546.72 1554.41
So as I hope you can see, it works by hand but not within a function.
That's why I think it's a bug.
Just for replicability (I hope)
GetDateRangeString <- function(thisDate,nextDate)
{
GetDateRangeString <-
paste(EnsureDate(thisDate),"::",EnsureDate(nextDate),sep="")
}
EnsureDate <- function(maybeWrongFormat)
{
as.POSIXct(strptime(maybeWrongFormat, "%Y-%m-%d"))
}
And theTimeSeries is
theTimeSeries <- getSymbols(tckr, from="2000-01-01",
to="2013-01-01",auto...