Learn R Programming

tbrf (version 0.1.7)

open_window: Open Window

Description

calculates the period at each row from the row of interest

Usage

open_window(x, tcolumn, unit = "years", n, i, na.pad)

Value

vector

Arguments

x

dataframe

tcolumn

time column

unit

unit

n

desired n

i

row number

na.pad

logical if `na.pad = TRUE` incomplete windows (duration of the window < `n`) return `NA`.