observe.wide: count observations from several columns in some interval

Description Usage Arguments Value

View source: R/observe.wide.R

Description

reduces repeated measures (for id) of a set of count varaibles

Usage

1
observe.wide(data, id, index.date, vars, interval)

Arguments

data

a data frame with a 'date' column, an index.date column, an id column and a set of count variables to be reduced to one row per id (n = length(unique(ids))).

id

name of id column.

index.date

name of index date column

vars

vector of names of the count variables to be reduced

intervel

the limits of an interval expressed as integer days relative to the index date

Value

a data frame with one row per id and columns with counts of input vars within interval


socioskop/grit documentation built on Dec. 23, 2021, 3:30 a.m.