count_rowsback: Count the number of rows to go back in data frame

Description Usage Arguments Details Value

Description

count_rowsback determines how many rows should be included

Usage

1
count_rowsback(datetime, back = 2)

Arguments

datetime

A vector of POSIXct values

back

An optional numeric specifying the number of days back to go. Defaults to 2 days.

Details

This function takes a vector of date/times (of type POSIXct) and counts the number of rows which would fall within the specified time frame. Typically called from mutate and the results are passed on to rollapplyr.

Value

An integer with the number of rows; can be passed on to rollapplyr


bgulbis/BGTools documentation built on May 12, 2019, 8:21 p.m.