consecutive.diff.time: consecutive.diff.time

Description Usage Arguments Value

Description

consecutive.diff.time

Usage

1
consecutive.diff.time(df, c1, c2, nm = "consec.diff", sc)

Arguments

df

the dataframe

c1

a column name of a POSIXct column

c2

a column name of a POSIXct column

nm

new column name

sc

screening column

Value

a dataframe which is a copy of df with a new column added, with name given by the parameter nm. Each entry of this new column is equal to [the entry in that row of c2] - [the entry in c1 from the row above], except where a screening column, sc, is TRUE, in which case the new column entry is NA for that row.


HorridTom/clahrcnwlhf documentation built on May 7, 2019, 4:02 a.m.