projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add realtime option, slightly refactor data acquisition
[talweg.git]
/
pkg
/
R
/
utils.R
diff --git
a/pkg/R/utils.R
b/pkg/R/utils.R
index
3649f58
..
bbf1387
100644
(file)
--- a/
pkg/R/utils.R
+++ b/
pkg/R/utils.R
@@
-16,7
+16,8
@@
dateIndexToInteger = function(index, data)
if (inherits(index, "Date") || is.character(index))
{
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
#TODO: tz arg to difftime ?
integerIndex <- round( as.numeric(
difftime(indexAsDate, as.Date(data$getTime(1)[1])) ) ) + 1