Skip to contents

Methods

General methods deffined by omopgenerics

attrition()
Get attrition from an object.
bind()
Bind two or more objects of the same class.
participants()
It returns the participants that contributed to a particular analysis
settings()
Get settings from an object.
suppress()
Function to suppress counts in result objects

Create new objects

To create new omopgenerics S3 classes objects

combineStrata()
Provide all combinations of strata levels.
newAchillesTable()
Create an achilles table from a cdm_table.
newCdmReference()
cdm_reference objects constructor
newCdmSource()
Create a cdm source object.
newCdmTable()
Create an cdm table.
newCodelist()
'codelist' object constructor
newCodelistWithDetails()
'codelist' object constructor
newCohortTable()
cohort_table objects constructor.
newConceptSetExpression()
'conceptSetExpression' object constructor
newLocalSource()
A new local source for the cdm
newOmopTable()
Create an omop table from a cdm table.
newSummarisedResult()
'summarised_results' object constructor

Creates empty objects

To create empty omopgenerics S3 classes objects

emptyAchillesTable()
Create an empty achilles table
emptyCdmReference()
Create an empty cdm_reference
emptyCodelist()
Empty codelist object.
emptyCodelistWithDetails()
Empty codelist object.
emptyCohortTable()
Create an empty cohort_table object
emptyOmopTable()
Create an empty omop table
emptySummarisedResult()
Empty summarised_result object.

cdm_reference utility functions

Utility functions for cdm_reference objects

`$`(<cdm_reference>)
Subset a cdm reference object.
`$<-`(<cdm_reference>)
Assign an table to a cdm reference.
cdmFromTables()
Create a cdm object from local tables
cdmName()
Get the name of a cdm_reference associated object
cdmReference()
Get the cdm_reference of a cdm_table.
cdmSelect()
Restrict the cdm object to a subset of tables.
cdmSource()
Get the cdmSource of an object.
cdmSourceType() deprecated
Get the source type of a cdm_reference object.
cdmTableFromSource()
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.
cdmVersion()
Get the version of an object.
collect(<cdm_reference>)
Retrieves the cdm reference into a local cdm.
compute(<cdm_table>)
Store results in a table.
print(<cdm_reference>)
Print a CDM reference object
`[[`(<cdm_reference>)
Subset a cdm reference object.
`[[<-`(<cdm_reference>)
Assign a table to a cdm reference.
summary(<cdm_reference>)
Summary a cdm reference
listSourceTables()
List tables that can be accessed though a cdm object.
dropSourceTable()
Drop a table from a cdm object.
insertTable()
Insert a table to a cdm object.
readSourceTable()
Read a table from the cdm_source and add it to to the cdm.
getPersonIdentifier()
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.

cdm_table utility functions

Utility functions for cdm_table objects

tableName()
Get the table name of a cdm_table.
tableSource()
Get the table source of a cdm_table.

omop_table utility functions

Utility functions for omop_table objects

omopColumns()
Required columns that the standard tables in the OMOP Common Data Model must have.
omopTableFields()
Return a table of omop cdm fields informations
omopTables()
Standard tables that a cdm reference can contain in the OMOP Common Data Model.

achilles_table utility functions

Utility functions for achilles_table objects

achillesColumns()
Required columns for each of the achilles result tables
achillesTables()
Names of the tables that contain the results of achilles analyses

cohort_table utility functions

Utility functions for cohort_table objects

attrition(<cohort_table>)
Get cohort attrition from a cohort_table object.
bind(<cohort_table>)
Bind two or more cohort tables
cohortCodelist()
Get codelist from a cohort_table object.
cohortColumns()
Required columns for a generated cohort set.
cohortCount()
Get cohort counts from a cohort_table object.
cohortTables()
Cohort tables that a cdm reference can contain in the OMOP Common Data Model.
collect(<cohort_table>)
To collect a cohort_table object.
getCohortId()
Get the cohort definition id of a certain name
getCohortName()
Get the cohort name of a certain cohort definition id
recordCohortAttrition()
Update cohort attrition.
settings(<cohort_table>)
Get cohort settings from a cohort_table object.
summary(<cohort_table>)
Summary a generated cohort set

summarised_result utility functions

Utility functions for summarised_result objects

bind(<summarised_result>)
Bind two or summarised_result objects
estimateTypeChoices()
Choices that can be present in estimate_type column.
exportSummarisedResult()
Export a summarised_result object to a csv file.
importSummarisedResult()
Import a set of summarised results.
resultColumns()
Required columns that the result tables must have.
settings(<summarised_result>)
Get settings from a summarised_result object.
summary(<summarised_result>)
Summary a summarised_result
suppress(<summarised_result>)
Function to suppress counts in result objects

codelist utility functions

Utility functions for codelist objects

exportCodelist()
Export a codelist object.
exportConceptSetExpression()
Export a concept set expression.
importCodelist()
Import a codelist.
importConceptSetExpression()
Import a concept set expression.
print(<codelist>)
Print a codelist
print(<codelist_with_details>)
Print a codelist with details
print(<conceptSetExpression>)
Print a concept set expression
resultPackageVersion()
Check if different packages version are used for summarise_results object

Argument validation

To validate input arguments of the functions

validateAgeGroupArgument()
validateAgeGroupArgument
validateCdmArgument()
validateCdmArgument
validateCohortArgument()
Validate a cohort table input.
validateCohortIdArgument()
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).
validateConceptSetArgument()
Validate conceptSet argument.
validateNameArgument()
Validate name argument.
validateNameLevel()
Validate if two columns are valid Name-Level pair.
validateResultArguemnt()
validateResultArgument
validateResultArgument()
validateResultArgument
validateWindowArgument()
validateWindowArgument
isResultSuppressed()
isResultSuppressed

General assertions

To assert that an object fulfills certain criteria

assertCharacter()
Assert that an object is a character and fulfill certain conditions.
assertChoice()
Assert that an object is within a certain oprtions.
assertClass()
Assert that an object has a certain class.
assertDate()
Assert Date
assertList()
Assert that an object is a list.
assertLogical()
Assert that an object is a logical.
assertNumeric()
Assert that an object is a numeric.
assertTable()
Assert that an object is a table.
assertTrue()
Assert that an expression is TRUE.

Utility functions

To be used internally by other packages, not meant to be user focused functions

insertFromSource() deprecated
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.
isTableEmpty()
Check if a table is empty or not
omopTableFields()
Return a table of omop cdm fields informations
sourceType()
Get the source type of an object.
tmpPrefix()
Create a temporary prefix for tables, that contains a unique prefix that starts with tmp.
uniqueId()
Get a unique Identifier with a certain number of characters and a prefix.
uniqueTableName()
Create a unique table name

Deprecated

Deprecated function that will be eliminated in future releases of the package

checkCohortRequirements() deprecated
Check whether a cohort table satisfies requirements
dropTable()
Drop a table from a cdm object.
toSnakeCase()
Convert a character vector to snake case