observe.count: count observations from one 'value' variable containing...

Description Usage Arguments Value

View source: R/observe.count.R

Description

count observations from one 'value' variable containing qualitative codes of any kind

Usage

1
observe.count(data, id, index.date, value, interval, valid.values, bin = F)

Arguments

data

is a dataframe with an id column, an index.date column, a value column and a date column ('date')

id

name of id column (multiple instances within id are aggregated to one row)

index.date

name of column containing and index/reference date

value

name of column with values to be counted and aggregated by id

interval

two outer limits as days (integer) relative to index. Positive integers look ahead, negative integers look back, (-10, +10) will observe 10 days around (pre/post) the index date

Value

returns a data frame of one row per id, that counts all incidences of all valid values within interval of days relative to index date


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