Skip to content

Refactor, move sex and yearofbirth comparison into #60

@javier-gracia-tabuenca-tuni

Description

add to R6 object 'CohortTableHandler' the following public functions

here

getCohortsOverlap = function() {

  • getNumberOfSubject(cohortId)
  • getNumberOfOverpapingSubjects(cohortId1, cohortId2)
  • getSexFisherTest(cohortId1, cohortId2)
  • getYearOfBirthTTest(cohortId1, cohortId2)

These functions include the codes from for example
https://github.com/FINNGEN/CO2AnalysisModules/blob/a545c225ef59a787829fd65ba9d1072f56902e99/R/mod_analysisSettings_TimeCodeWAS.R#L205C4-L220C1

add also a test for each of these functions

this can be a good starting template
https://github.com/FINNGEN/HadesExtras/blob/a571b3772877f3cbf22313e4b277eb4e5777ef94/tests/testthat/test-CohortTableHandler.R#L283C1-L308C3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions