X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2Futils.R;h=bbf138750d21b2bdca0694980e5c1e0ff85d7acb;hp=3649f5865a72fbeeb182cd6ef677fcb963b361e9;hb=72b9c50162bcdcf6c99fbb8b2ec6ea9ba98379cb;hpb=ed5977b22fb345f6586364c4e0ee841a4a600aaf diff --git a/pkg/R/utils.R b/pkg/R/utils.R index 3649f58..bbf1387 100644 --- 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)) { - 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