timeDF-package {timeDF} | R Documentation |
Subset and Flag Data Frames with Times by the Use of Periods
Description
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.
Details
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.
Author(s)
Toshihiro Umehara [aut, cre] Maintainer: Toshihiro Umehara <toshi@niceume.com>
See Also
timeDF-class
periodDF-class
as.timeDF
as.periodDF
vec_to_periodDF
extract_with_periodDF
flag_with_periodDF
Examples
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")
[Package timeDF version 0.9.1 Index]