chrt_filter_select: Quickly perform filter & select routine used in 'cohorts'

View source: R/00_cohorts_utils.R

chrt_filter_selectR Documentation

Quickly perform filter & select routine used in cohorts

Description

All _*between filters use rm_dates$calc$data_goes_back_to as the beginning of the period and rm_dates$meta_HUDCSV$Export_End as the end. See dates for details on these values.

Usage

chrt_filter_select(
  x,
  ...,
  stayed = FALSE,
  served = FALSE,
  exited = FALSE,
  entered = FALSE,
  rm_dates,
  vars,
  start = rm_dates$calc$data_goes_back_to,
  end = rm_dates$meta_HUDCSV$Export_End,
  app_env = get_app_env(e = rlang::caller_env())
)

Arguments

x

(data.frame) Must include columns necessary for the _*between function used or any additional filter expressions supplied.

...

(expression)s used to filter data

stayed

(logical) Uses stayed_between

served

(logical) Uses served_between

exited

(logical) Uses exited_between

entered

(logical) Uses entered_between

rm_dates

(named list) with all dates specified or calculated in dates

vars

(character) vector of column names to retrain

start

Default = ReportStart, character/date of the start of the date range. Characters in format mdY, Ymd, dmY acceptable. Will be automatically retrieved from parent environments if not specified. If start is named other than ReportStart, it must be specified.

end

Default = ReportEnd, character/date of the end of the date range. Characters in format mdY, Ymd, dmY acceptable. Will be automatically retrieved from parent environments if not specified. If end is named other than ReportEnd, it must be specified.

app_env

(environment) The application environment, defaults to the result of get_app_env(e = rlang::caller_env()).

Value

(data.frame) Output with filter and select applied.


COHHIO/Rm_data documentation built on Dec. 9, 2024, 2:10 p.m.