add realtime option, slightly refactor data acquisition
[talweg.git] / pkg / R / utils.R
index 3649f58..bbf1387 100644 (file)
@@ -16,7 +16,8 @@ dateIndexToInteger = function(index, data)
 
        if (inherits(index, "Date") || is.character(index))
        {
-               tryCatch(indexAsDate <- as.Date(index), error=function(e) stop("Unrecognized index format"))
+               tryCatch(indexAsDate <- as.Date(index),
+                       error=function(e) stop("Unrecognized index format"))
                #TODO: tz arg to difftime ?
                integerIndex <- round( as.numeric(
                        difftime(indexAsDate, as.Date(data$getTime(1)[1])) ) ) + 1