timeDF-package | R Documentation |
Data frames with time information are subset and flagged with period information. Data frames with times are dealt as timeDF objects and periods are represented as periodDF objects.
Package timeDF provides functionality to deal with times with the use of periods. With period information, data frames with time information are subset and flagged.
Toshihiro Umehara [aut, cre] Maintainer: Toshihiro Umehara <toshi@niceume.com>
timeDF-class
periodDF-class
as.timeDF
as.periodDF
vec_to_periodDF
extract_with_periodDF
flag_with_periodDF
library(timeDF)
time_df = data.frame(
time = c("2023-01-01 12:00:00",
"2023-01-21 12:00:00",
"2023-02-10 12:00:00",
"2023-03-02 12:00:00",
"2023-03-22 12:00:00",
"2023-04-11 12:00:00"
),
value = c(123, 144, 150, 100, 130, 145)
)
timeDF = as.timeDF(time_df)
period_df = data.frame(
start = c("2023-01-01",
"2023-03-01"),
end = c("2023-01-31",
"2023-03-31")
)
periodDF = as.periodDF(period_df, "date")
extract_with_periodDF(timeDF, periodDF, "both")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.