portion_withoverlaps: Slices a data.frame containing date-time type columns...

Description Usage Arguments Details Value Examples

View source: R/portion.r

Description

Slices a data.frame containing date-time type columns including overlaping periods.

Usage

1
portion_withoverlaps(x, from, to, tz = "UTC", ...)

Arguments

x

a dataframe

from

a vector of lenght = participants

to

a vector of lenght = participants

tz

is the time zone

...

Optional parameters

Details

it does include overlaps periods: periods that started (ended) before (after) start.period (end.period)

Value

a dataframe

Examples

1
2
3
4
library("lubridate")
start.period <- ymd_hms("2017-12-10 12:00:00")
end.period <- ymd_hms("2017-12-12 12:00:00")
portion_withoverlaps(act[act$subject_ID==1,], from = start.period,  to = end.period)

ActisoftR documentation built on Oct. 16, 2018, 5:04 p.m.