darwin-eu / darwin-eu/CohortCharacteristics

Attrition is ordered alphabetically in plots (diagram)

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When I use the package CohortCharacteristics the attrition is ordered alphabetically in plots (this does not happen in tables) instead of following the order of the results

```
library(CohortCharacteristics)

cdm <- mockCohortCharacteristics()

# attrition of cohort 2
result2 <- summariseCohortAttrition(cdm$cohort1, cohortId = 2)

# attrition of cohort 1
result1 <- summariseCohortAttrition(cdm$cohort1, cohortId = 1)

# bind results (cohort 2 is before cohort 1)
result <- bind(result2, result1)

# table works
tableCohortAttrition(result)

# plot recorders
plotCohortAttrition(result, type = "png")
```

Contributor guide

Open the contributing guide

Research direction

Start by running the reproducible example with mockCohortCharacteristics(), summariseCohortAttrition(), bind(), tableCohortAttrition(), and plotCohortAttrition(). Compare the plot's attrition ordering with the bound result and the table output. Done means plotCohortAttrition preserves the input result order, including cohort 2 before cohort 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.