Package: cohortBuilder 0.2.0

Krystian Igras

cohortBuilder: Data Source Agnostic Filtering Tools

Common API for filtering data stored in different data models. Provides multiple filter types and reproducible R code. Works standalone or with 'shinyCohortBuilder' as the GUI for interactive Shiny apps.

Authors:Krystian Igras [cre, aut], Adam Foryƛ [ctb]

cohortBuilder_0.2.0.tar.gz
cohortBuilder_0.2.0.zip(r-4.5)cohortBuilder_0.2.0.zip(r-4.4)cohortBuilder_0.2.0.zip(r-4.3)
cohortBuilder_0.2.0.tgz(r-4.4-any)cohortBuilder_0.2.0.tgz(r-4.3-any)
cohortBuilder_0.2.0.tar.gz(r-4.5-noble)cohortBuilder_0.2.0.tar.gz(r-4.4-noble)
cohortBuilder_0.2.0.tgz(r-4.4-emscripten)cohortBuilder_0.2.0.tgz(r-4.3-emscripten)
cohortBuilder.pdf |cohortBuilder.html
cohortBuilder/json (API)
NEWS

# Install 'cohortBuilder' in R:
install.packages('cohortBuilder', repos = c('https://r-world-devs.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/r-world-devs/cohortbuilder/issues

Datasets:

On CRAN:

53 exports 4 stars 1.33 score 38 dependencies 1 dependents 43 scripts 272 downloads

Last updated 1 years agofrom:db2b9b58cc. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 13 2024
R-4.5-winNOTESep 13 2024
R-4.5-linuxNOTESep 13 2024
R-4.4-winNOTESep 13 2024
R-4.4-macNOTESep 13 2024
R-4.3-winOKSep 13 2024
R-4.3-macOKSep 13 2024

Exports:.as_constructor.collect_data.gen_id.get_attrition_count.get_attrition_label.get_item.get_method.get_stats.if_value.init_step.post_binding.post_filtering.pre_filtering.repro_code_tweak.run_binding%->%add_filteradd_hookadd_sourceadd_stepas.tblistattritionbind_keybind_keyscb_filter.date_rangecb_filter.discretecb_filter.discrete_textcb_filter.multi_discretecb_filter.rangecodecohortdata_keydef_filterdescriptionfilterget_dataget_hookget_statenew_filterplot_dataprimary_keysrestorerm_filterrm_steprunset_sourceSourcestatstepsum_uptblistupdate_filterupdate_source

Dependencies:clicolorspacecpp11dplyrfansifarverformatRgenericsggplot2gluegtableisobandjsonlitelabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerrlangscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Implementing custom filters

Rendered fromcustom-filters.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2022-05-31
Started: 2022-05-22

Introduction to cohortBuilder

Rendered fromcohortBuilder.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-03-01
Started: 2022-05-22

Managing Cohort Object

Rendered frommanaging-cohort.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-03-01
Started: 2022-05-22

Specifying data relations with Binding Keys

Rendered frombinding-keys.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2022-05-22
Started: 2022-05-22

Variants for Cohort Configuration

Rendered fromcohort-configuration.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2022-05-22
Started: 2022-05-22

Writing custom extensions

Rendered fromcustom-extensions.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2022-07-27
Started: 2022-05-22

Readme and manuals

Help Manual

Help pageTopics
Create data source cohortcohortBuilder-package
Attach proper class to filter constructor.as_constructor
Generate random ID.gen_id
Return list of objects matching provided condition..get_item
Get function definition.get_method
Return default value if values are equal.if_value
Operator simplifying adding steps or filters to Cohort and Source objects%->%
Add filter definitionadd_filter add_filter.Cohort add_filter.Source
Add source to Cohort object.add_source
Add filtering step definitionadd_step add_step.Cohort add_step.Source
Show attrition plot.attrition
Describe data relations with binding keysbinding-keys bind_key bind_keys
Return reproducible data filtering code.code
R6 class representing Cohort object.Cohort
Cohort related methodscohort-methods
Create new 'Cohort' objectcohort create-cohort
Define custom filter.creating-filters def_filter new_filter
Define Source dataset keydata_key
Show source data or filter descriptiondescription
Define Cohort filterfilter filter.character
Filter Source types methodscb_filter.date_range cb_filter.date_range.tblist cb_filter.discrete cb_filter.discrete.tblist cb_filter.discrete_text cb_filter.discrete_text.tblist cb_filter.multi_discrete cb_filter.multi_discrete.tblist cb_filter.range cb_filter.range.tblist filter-source-types
Filter typesfilter-types filter.date_range filter.discrete filter.discrete_text filter.multi_discrete filter.range
Get step related dataget_data
Get Cohort configuration state.get_state
Cohort hooks.add_hook get_hook hooks
Sample of library databaselibrarian
Managing the Cohort objectmanaging-cohort
Managing the Source objectmanaging-source
Plot filter related Cohort data.plot_data
Define Source datasets primary keysprimary_keys
Restore Cohort object.restore
Remove filter definitionrm_filter rm_filter.Cohort rm_filter.Source
Remove filtering step definitionrm_step rm_step.Cohort rm_step.Source
Trigger data calculations.run
Create Cohort sourceset_source set_source.tblist
R6 class representing a data sourceSource
Source compatibility methods..collect_data .collect_data.default .collect_data.tblist .get_attrition_count .get_attrition_count.default .get_attrition_label .get_attrition_label.default .get_stats .get_stats.default .get_stats.tblist .init_step .init_step.default .init_step.tblist .post_binding .post_binding.default .post_filtering .post_filtering.default .pre_filtering .pre_filtering.default .repro_code_tweak .run_binding .run_binding.default source-layer
Get Cohort related statistics.stat
Create filtering stepstep
Sum up Cohort state.sum_up
Create in memory tables connectionas.tblist tblist
Update filter definitionupdate_filter update_filter.Cohort update_filter.Source
Update source in Cohort object.update_source