Package: FeatureExtraction 3.8.0

Ger Inberg

FeatureExtraction: Generating Features for a Cohort

An R interface for generating features for a cohort using data in the Common Data Model. Features can be constructed using default or custom made feature definitions. Furthermore it's possible to aggregate features and get the summary statistics.

Authors:Martijn Schuemie [aut], Marc Suchard [aut], Patrick Ryan [aut], Jenna Reps [aut], Anthony Sena [aut], Ger Inberg [aut, cre], Observational Health Data Science and Informatics [cph]

FeatureExtraction_3.8.0.tar.gz
FeatureExtraction_3.8.0.tar.gz(r-4.5-noble)FeatureExtraction_3.8.0.tar.gz(r-4.4-noble)
FeatureExtraction_3.8.0.tgz(r-4.4-emscripten)FeatureExtraction_3.8.0.tgz(r-4.3-emscripten)
FeatureExtraction.pdf |FeatureExtraction.html
FeatureExtraction/json (API)
NEWS

# Install 'FeatureExtraction' in R:
install.packages('FeatureExtraction', repos = 'https://cloud.r-project.org')

Bug tracker:https://github.com/ohdsi/featureextraction/issues52 issues

Uses libs:
  • openjdk– OpenJDK Java runtime, using Hotspot JIT

On CRAN:

Conda:

openjdk

5.03 score 2 packages 730 downloads 32 exports 54 dependencies

Last updated 14 days agofrom:c80764f887. Checks:1 OK, 2 WARNING. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKMar 19 2025
R-4.5-linuxWARNINGMar 19 2025
R-4.4-linuxWARNINGMar 19 2025

Exports:aggregateCovariatescomputeStandardizedDifferenceconvertPrespecSettingsToDetailedSettingscreateAnalysisDetailscreateCohortAttrCovariateSettingscreateCohortBasedCovariateSettingscreateCohortBasedTemporalCovariateSettingscreateCovariateSettingscreateDefaultCovariateSettingscreateDefaultTemporalCovariateSettingscreateDetailedCovariateSettingscreateDetailedTemporalCovariateSettingscreateEmptyCovariateDatacreateTable1createTable1CovariateSettingscreateTemporalCovariateSettingscreateTemporalSequenceCovariateSettingsfilterByCohortDefinitionIdfilterByRowIdgetDbCohortAttrCovariatesDatagetDbCohortBasedCovariatesDatagetDbCovariateDatagetDbDefaultCovariateDatagetDefaultTable1SpecificationsisAggregatedCovariateDataisCovariateDataisTemporalCovariateDataloadCovariateDatasaveCovariateDatashowsummarytidyCovariateData

Dependencies:Andromedabackportsbitbit64blobcachemcheckmateclicliprcpp11crayonDatabaseConnectorDBIdbplyrdigestdplyrfansifastmapgenericsgluehmsjsonlitelifecyclemagrittrmemoiseParallelLoggerpillarpkgconfigplogrprettyunitsprogresspurrrR6RcppreadrrJavarlangRSQLitesnowSqlRenderstringistringrtibbletidyrtidyselecttriebeardtzdburltoolsutf8vctrsvroomwithrxml2zip

Creating covariates based on other cohorts

Rendered fromCreatingCovariatesBasedOnOtherCohorts.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-05-02
Started: 2024-05-02

Creating covariates using cohort attributes

Rendered fromCreatingCovariatesUsingCohortAttributes.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-05-02
Started: 2024-05-02

Creating custom covariate builders

Rendered fromCreatingCustomCovariateBuilders.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-07-16
Started: 2024-05-02

Creating custom covariate builders (Korean)

Rendered fromCreatingCustomCovariateBuildersKorean.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-05-02
Started: 2024-05-02

Using FeatureExtraction

Rendered fromUsingFeatureExtraction.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-05-02
Started: 2024-05-02

Using FeatureExtraction (Korean)

Rendered fromUsingFeatureExtractionKorean.Rmdusingknitr::rmarkdownon Mar 19 2025.

Last update: 2024-05-02
Started: 2024-05-02

Citation

To cite package ‘FeatureExtraction’ in publications use:

Schuemie M, Suchard M, Ryan P, Reps J, Sena A, Inberg G (2025). FeatureExtraction: Generating Features for a Cohort. R package version 3.8.0, https://CRAN.R-project.org/package=FeatureExtraction.

Corresponding BibTeX entry:

  @Manual{,
    title = {FeatureExtraction: Generating Features for a Cohort},
    author = {Martijn Schuemie and Marc Suchard and Patrick Ryan and
      Jenna Reps and Anthony Sena and Ger Inberg},
    year = {2025},
    note = {R package version 3.8.0},
    url = {https://CRAN.R-project.org/package=FeatureExtraction},
  }

Readme and manuals

FeatureExtraction

FeatureExtraction is part of HADES.

Introduction

An R package for generating features (covariates) for a cohort using data in the Common Data Model.

Features

  • Takes a cohort as input.
  • Generates baseline features for that cohort.
  • Default covariates include all drugs, diagnoses, procedures, as well as age, comorbidity indexes, etc.
  • Support for creating custom covariates.
  • Generate paper-ready summary table of select population characteristics.

Technology

FeatureExtraction is an R package, with some functions implemented in C++.

System Requirements

Requires R (version 3.2.2 or higher). Installation on Windows requires RTools. FeatureExtraction require Java.

Getting Started

  1. See the instructions here for configuring your R environment, including RTools and Java.

  2. In R, use the following commands to download and install FeatureExtraction:

install.packages("drat")
drat::addRepo("OHDSI")
install.packages("FeatureExtraction")

User Documentation

The documentation website can be found at https://ohdsi.github.io/FeatureExtraction/. PDF versions of the vignettes and package manual are here:

These vignettes are also available in Korean:

Support

Contributing

Read here how you can contribute to this package.

License

FeatureExtraction is licensed under Apache License 2.0

Development

FeatureExtraction is being developed in R Studio.

Development status

Ready for use

Acknowledgements

  • This project is supported in part through the National Science Foundation grant IIS 1251151.

Help Manual

Help pageTopics
Get covariate settings.createLooCovariateSettings
Get covariate information from the database.getDbLooCovariateData
Aggregate covariate dataaggregateCovariates
Compute standardized difference of mean for all covariates.computeStandardizedDifference
Convert prespecified covariate settings into detailed covariate settingsconvertPrespecSettingsToDetailedSettings
Covariate DataCovariateData CovariateData-class show,CovariateData-method summary,CovariateData-method
Create detailed covariate settingscreateAnalysisDetails
Create cohort attribute covariate settingscreateCohortAttrCovariateSettings
Create settings for covariates based on other cohortscreateCohortBasedCovariateSettings
Create settings for temporal covariates based on other cohortscreateCohortBasedTemporalCovariateSettings
Create covariate settingscreateCovariateSettings
Create default covariate settingscreateDefaultCovariateSettings
Create default covariate settingscreateDefaultTemporalCovariateSettings
Create detailed covariate settingscreateDetailedCovariateSettings
Create detailed temporal covariate settingscreateDetailedTemporalCovariateSettings
Creates an empty covariate data objectcreateEmptyCovariateData
Create a table 1createTable1
Create covariate settings for a table 1createTable1CovariateSettings
Create covariate settingscreateTemporalCovariateSettings
Create covariate settingscreateTemporalSequenceCovariateSettings
Filter covariates by cohort definition IDsfilterByCohortDefinitionId
Filter covariates by row IDfilterByRowId
Getcovariate information from the database through the cohort_attribute tablegetDbCohortAttrCovariatesData
Get covariate information from the database based on other cohortsgetDbCohortBasedCovariatesData
Get covariate information from the databasegetDbCovariateData
Get default covariate information from the databasegetDbDefaultCovariateData
Get the default table 1 specificationsgetDefaultTable1Specifications
Check whether covariate data is aggregatedisAggregatedCovariateData
Check whether an object is a CovariateData objectisCovariateData
Check whether covariate data is temporalisTemporalCovariateData
Load the covariate data from a folderloadCovariateData
Save the covariate data to foldersaveCovariateData
Tidy covariate datatidyCovariateData