construct_windows: Construct time windows

Description Usage Arguments Value Examples

View source: R/wf_moving_window.R

Description

Constructs time windows for moving window analysis

Usage

1

Arguments

start

[POSIXt] The start date and time for the first window.

width

[Period] A Period object specifying the width of each moving window.

step

[Period] A Period object specifying the space between start times for each moving window.

end

[POSIXt] The last date and time to include at the end of a window.

Value

Returns a data.frame with columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load lubridate
library(lubridate)

# Grab a date/time
right_now <- Sys.time()

# Construct windows
construct_windows(start = right_now,
                  width = days(5),
                  step = days(1),
                  end = right_now + days(100))

bsmity13/LoCoHverlap documentation built on Feb. 15, 2021, 12:43 p.m.