Package: omopgenerics 1.1.0

Martí Català

omopgenerics: Methods and Classes for the OMOP Common Data Model

Provides definitions of core classes and methods used by analytic pipelines that query the OMOP (Observational Medical Outcomes Partnership) common data model.

Authors:Martí Català [aut, cre], Edward Burn [aut], Mike Du [ctb], Yuchen Guo [ctb], Adam Black [ctb], Marta Alcalde-Herraiz [ctb]

omopgenerics_1.1.0.tar.gz
omopgenerics_1.1.0.tar.gz(r-4.5-noble)omopgenerics_1.1.0.tar.gz(r-4.4-noble)
omopgenerics_1.1.0.tgz(r-4.4-emscripten)omopgenerics_1.1.0.tgz(r-4.3-emscripten)
omopgenerics.pdf |omopgenerics.html
omopgenerics/json (API)
NEWS

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

Bug tracker:https://github.com/darwin-eu/omopgenerics/issues

Pkgdown site:https://darwin-eu.github.io

On CRAN:

Conda:

7.64 score 1 stars 16 packages 195 scripts 1.7k downloads 119 exports 25 dependencies

Last updated 16 days agofrom:737612b919. Checks:2 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKFeb 25 2025
R-4.5-linuxOKFeb 25 2025

Exports:achillesColumnsachillesTablesadditionalColumnsaddSettingsassertCharacterassertChoiceassertClassassertDateassertListassertLogicalassertNumericassertTableassertTrueattritionbindcdmDisconnectcdmFromTablescdmNamecdmReferencecdmSelectcdmSourcecdmSourceTypecdmTableFromSourcecdmVersioncheckCohortRequirementscohortCodelistcohortColumnscohortCountcohortTablescombineStratadropSourceTabledropTableemptyAchillesTableemptyCdmReferenceemptyCodelistemptyCodelistWithDetailsemptyCohortTableemptyOmopTableemptySummarisedResultestimateTypeChoicesexportCodelistexportConceptSetExpressionexportSummarisedResultfilterfilterAdditionalfilterGroupfilterSettingsfilterStratagetCohortIdgetCohortNamegetPersonIdentifiergroupColumnsimportCodelistimportConceptSetExpressionimportSummarisedResultinsertCdmToinsertFromSourceinsertTableisResultSuppressedisTableEmptylistSourceTablesnewAchillesTablenewCdmReferencenewCdmSourcenewCdmTablenewCodelistnewCodelistWithDetailsnewCohortTablenewConceptSetExpressionnewLocalSourcenewOmopTablenewSummarisedResultnumberRecordsnumberSubjectsomopColumnsomopTableFieldsomopTablespivotEstimatesreadSourceTablerecordCohortAttritionresultColumnsresultPackageVersionsettingssettingsColumnssourceTypesplitAdditionalsplitAllsplitGroupsplitStratastrataColumnssuppresstableNametableSourcetidytidyColumnstmpPrefixtoSnakeCasetransformToSummarisedResultuniqueIduniqueTableNameuniteAdditionaluniteGroupuniteStratavalidateAchillesTablevalidateAgeGroupArgumentvalidateCdmArgumentvalidateCdmTablevalidateCohortArgumentvalidateCohortIdArgumentvalidateColumnvalidateConceptSetArgumentvalidateNameArgumentvalidateNameLevelvalidateNameStylevalidateNewColumnvalidateOmopTablevalidateResultArgumentvalidateStrataArgumentvalidateWindowArgument

Dependencies:blobclicpp11DBIdbplyrdplyrfansigenericsgluelifecyclemagrittrpillarpkgconfigpurrrR6rlangsnakecasestringistringrtibbletidyrtidyselectutf8vctrswithr

The cdm reference

Rendered fromcdm_reference.Rmdusingknitr::rmarkdownon Feb 25 2025.

Last update: 2024-08-18
Started: 2024-08-18

Concept sets

Rendered fromcodelists.Rmdusingknitr::rmarkdownon Feb 25 2025.

Last update: 2024-11-22
Started: 2024-08-18

Cohort tables

Rendered fromcohorts.Rmdusingknitr::rmarkdownon Feb 25 2025.

Last update: 2024-11-22
Started: 2024-08-18

A summarised result

Rendered fromsummarised_result.Rmdusingknitr::rmarkdownon Feb 25 2025.

Last update: 2024-11-22
Started: 2024-08-18

Re-exporting functions from omopgnerics

Rendered fromreexport.Rmdusingknitr::rmarkdownon Feb 25 2025.

Last update: 2025-02-14
Started: 2024-02-24

Readme and manuals

Help Manual

Help pageTopics
Subset a cdm reference object.[[.cdm_reference
Assign a table to a cdm reference.[[<-.cdm_reference
Subset a cdm reference object.$.cdm_reference
Assign an table to a cdm reference.$<-.cdm_reference
Required columns for each of the achilles result tablesachillesColumns
Names of the tables that contain the results of achilles analysesachillesTables
Identify variables in additional_name columnadditionalColumns
Add settings columns to a <summarised_result> objectaddSettings
Assert that an object is a character and fulfill certain conditions.assertCharacter
Assert that an object is within a certain oprtions.assertChoice
Assert that an object has a certain class.assertClass
Assert DateassertDate
Assert that an object is a list.assertList
Assert that an object is a logical.assertLogical
Assert that an object is a numeric.assertNumeric
Assert that an object is a table.assertTable
Assert that an expression is TRUE.assertTrue
Get attrition from an object.attrition
Get cohort attrition from a cohort_table object.attrition.cohort_table
Bind two or more objects of the same class.bind
Bind two or more cohort tablesbind.cohort_table
Bind two or summarised_result objectsbind.summarised_result
Disconnect from a cdm object.cdmDisconnect
Create a cdm object from local tablescdmFromTables
Get the name of a cdm_reference associated objectcdmName
Get the 'cdm_reference' of a 'cdm_table'.cdmReference
Restrict the cdm object to a subset of tables.cdmSelect
Get the cdmSource of an object.cdmSource
Get the source type of a cdm_reference object.cdmSourceType
This is an internal developer focused function that creates a cdm_table from a table that shares the source but it is not a cdm_table. Please use insertTable if you want to insert a table to a cdm_reference object.cdmTableFromSource
Get the version of an object.cdmVersion
Check whether a cohort table satisfies requirementscheckCohortRequirements
Get codelist from a cohort_table object.cohortCodelist
Required columns for a generated cohort set.cohortColumns
Get cohort counts from a cohort_table object.cohortCount
Cohort tables that a cdm reference can contain in the OMOP Common Data Model.cohortTables
Retrieves the cdm reference into a local cdm.collect.cdm_reference
To collect a 'cohort_table' object.collect.cohort_table
Provide all combinations of strata levels.combineStrata
Store results in a table.compute.cdm_table
Drop a table from a cdm object.dropSourceTable
Drop a table from a cdm object. *[Deprecated]*dropTable
Create an empty achilles tableemptyAchillesTable
Create an empty cdm_referenceemptyCdmReference
Empty 'codelist' object.emptyCodelist
Empty 'codelist' object.emptyCodelistWithDetails
Create an empty cohort_table objectemptyCohortTable
Create an empty omop tableemptyOmopTable
Empty 'summarised_result' object.emptySummarisedResult
Choices that can be present in 'estimate_type' column.estimateTypeChoices
Export a codelist object.exportCodelist
Export a concept set expression.exportConceptSetExpression
Export a summarised_result object to a csv file.exportSummarisedResult
Filter the additional_name-additional_level pair in a summarised_resultfilterAdditional
Filter the group_name-group_level pair in a summarised_resultfilterGroup
Filter a <summarised_result> using the settingsfilterSettings
Filter the strata_name-strata_level pair in a summarised_resultfilterStrata
Get the cohort definition id of a certain namegetCohortId
Get the cohort name of a certain cohort definition idgetCohortName
Get the column name with the person identifier from a table (either subject_id or person_id), it will throw an error if it contains both or neither.getPersonIdentifier
Identify variables in group_name columngroupColumns
Import a codelist.importCodelist
Import a concept set expression.importConceptSetExpression
Import a set of summarised results.importSummarisedResult
Insert a cdm_reference object to a different source.insertCdmTo
Convert a table that is not a cdm_table but have the same original source to a cdm_table. This Table is not meant to be used to insert tables in the cdm, please use insertTable instead.insertFromSource
Insert a table to a cdm object.insertTable
To check whether an object is already suppressed to a certain min cell count.isResultSuppressed
Check if a table is empty or notisTableEmpty
List tables that can be accessed though a cdm object.listSourceTables
Create an achilles table from a cdm_table.newAchillesTable
'cdm_reference' objects constructornewCdmReference
Create a cdm source object.newCdmSource
Create an cdm table.newCdmTable
'codelist' object constructornewCodelist
'codelist' object constructornewCodelistWithDetails
'cohort_table' objects constructor.newCohortTable
'conceptSetExpression' object constructornewConceptSetExpression
A new local source for the cdmnewLocalSource
Create an omop table from a cdm table.newOmopTable
'summarised_results' object constructornewSummarisedResult
Count the number of records that a 'cdm_table' has.numberRecords
Count the number of subjects that a 'cdm_table' has.numberSubjects
Required columns that the standard tables in the OMOP Common Data Model must have.omopColumns
Return a table of omop cdm fields informationsomopTableFields
Standard tables that a cdm reference can contain in the OMOP Common Data Model.omopTables
Set estimates as columnspivotEstimates
Print a CDM reference objectprint.cdm_reference
Print a codelistprint.codelist
Print a codelist with detailsprint.codelist_with_details
Print a concept set expressionprint.conceptSetExpression
Read a table from the cdm_source and add it to to the cdm.readSourceTable
Update cohort attrition.recordCohortAttrition
Required columns that the result tables must have.resultColumns
Check if different packages version are used for summarise_results objectresultPackageVersion
Get settings from an object.settings
Get cohort settings from a cohort_table object.settings.cohort_table
Get settings from a summarised_result object.settings.summarised_result
Identify settings columns of a <summarised_result>settingsColumns
Get the source type of an object.sourceType
Split additional_name and additional_level columnssplitAdditional
Split all pairs name-level into columns.splitAll
Split group_name and group_level columnssplitGroup
Split strata_name and strata_level columnssplitStrata
Identify variables in strata_name columnstrataColumns
Summary a cdm referencesummary.cdm_reference
Summary a generated cohort setsummary.cohort_table
Summary a summarised_resultsummary.summarised_result
Function to suppress counts in result objectssuppress
Function to suppress counts in result objectssuppress.summarised_result
Get the table name of a 'cdm_table'.tableName
Get the table source of a 'cdm_table'.tableSource
Turn a <summarised_result> object into a tidy tibbletidy.summarised_result
Identify tidy columns of a <summarised_result>tidyColumns
Create a temporary prefix for tables, that contains a unique prefix that starts with tmp.tmpPrefix
Convert a character vector to snake casetoSnakeCase
Create a <summarised_result> object from a data.frame, given a set of specifications.transformToSummarisedResult
Get a unique Identifier with a certain number of characters and a prefix.uniqueId
Create a unique table nameuniqueTableName
Unite one or more columns in additional_name-additional_level formatuniteAdditional
Unite one or more columns in group_name-group_level formatuniteGroup
Unite one or more columns in strata_name-strata_level formatuniteStrata
Validate if a cdm_table is a valid achilles table.validateAchillesTable
Validate the ageGroup argument. It must be a list of two integerish numbers lower age and upper age, both of the must be greater or equal to 0 and lower age must be lower or equal to the upper age. If not named automatic names will be given in the output list.validateAgeGroupArgument
Validate if an object in a valid cdm_reference.validateCdmArgument
Validate if a table is a valid cdm_table object.validateCdmTable
Validate a cohort table input.validateCohortArgument
Validate cohortId argument. CohortId can either be a cohort_definition_id value, a cohort_name or a tidyselect expression referinc to cohort_names. If you want to support tidyselect expressions please use the function as: 'validateCohortIdArgument({{cohortId}}, cohort)'.validateCohortIdArgument
Validate whether a variable points to a certain exiting column in a table.validateColumn
Validate conceptSet argument. It can either be a list, a codelist, a conceptSetExpression or a codelist with details. The output will always be a codelist.validateConceptSetArgument
Validate name argument. It must be a snake_case character vector. You can add the a cdm object to check 'name' is not already used in that cdm.validateNameArgument
Validate if two columns are valid Name-Level pair.validateNameLevel
Validate 'nameStyle' argument. If any of the element in '...' has length greater than 1 it must be contained in nameStyle. Note that snake case notation is used.validateNameStyle
Validate a new column of a tablevalidateNewColumn
Validate an omop_tablevalidateOmopTable
Validate if a an object is a valid 'summarised_result' object.validateResultArgument
To validate a strata list. It makes sure that elements are unique and point to columns in table.validateStrataArgument
Validate a window argument. It must be a list of two elements (window start and window end), both must be integerish and window start must be lower or equal than window end.validateWindowArgument