Commit 45035e85 authored by Enrico Schumann's avatar Enrico Schumann

Version: 0.4-4

DESCRIPTION (Suggests): add MonetDBLite

read_ts_tables: update for changes in package datetimeutils (0.2-0)
parent 3c6a143c
2017-05-08 Enrico Schumann <es@enricoschumann.net>
* DESCRIPTION (Version): Version: 0.4-4
(Suggests): add MonetDBLite
* R/functions.R (read_ts_tables): update for
changes in package datetimeutils (0.2-0)
2017-03-31 Enrico Schumann <es@enricoschumann.net>
* DESCRIPTION (Version): 0.4-3
......
Package: tsdb
Type: Package
Title: Terribly-Simple Data Base for Time Series
Version: 0.4-3
Date: 2017-03-31
Version: 0.4-4
Date: 2017-05-08
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person("Enrico", "Schumann",
role = c("aut", "cre"),
......@@ -13,3 +13,4 @@ Description: A terribly-simple data base for time series. All
joining data.
License: GPL-3
Imports: DBI, datetimeutils, fastmatch, utils, zoo
Suggests: MonetDBLite
......@@ -6,14 +6,16 @@ export(
)
importFrom("DBI",
"dbConnect",
"dbDisconnect",
"dbGetQuery",
"dbQuoteIdentifier",
"dbWriteTable"
)
importFrom("datetimeutils",
"isBusinessDay",
"previousBusinessDay")
"is_businessday",
"previous_businessday")
importFrom("fastmatch",
"fmatch")
......
......@@ -168,13 +168,13 @@ read_ts_tables <- function(file, dir, t.type = "guess",
as.Date(start)
end <- if (missing(end))
previousBusinessDay(Sys.Date())
previous_businessday(Sys.Date())
else
as.Date(end)
timestamp <- seq(start, end , "1 day")
if (drop.weekends)
timestamp <- timestamp[isBusinessDay(timestamp)]
timestamp <- timestamp[is_businessday(timestamp)]
} else if (t.type == "POSIXct") {
warning("'Oh boy', said Helen, 'that's not really supported.'")
start <- if (missing(start))
......@@ -183,7 +183,7 @@ read_ts_tables <- function(file, dir, t.type = "guess",
as.POSIXct(start)
if (missing(end))
end <- as.POSIXct(previousBusinessDay(Sys.Date()))
end <- as.POSIXct(previous_businessday(Sys.Date()))
else
end <- as.POSIXct(end)
timestamp <- seq(start, end , "1 sec")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment