portion: #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.

Usage

1
portion(x, from, to, ...)

Arguments

x

at dataframe

from

a vector of lenght = participants

to

a vector of lenght = participants

...

Optional parameters

Details

it does not 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(act[act$subject_ID==1,], from = start.period,  to = end.period)

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