error when argument countBy = "person" only for summariseCodeUse
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in CodelistGenerator/R/summariseCodeUse.R at the reported line 417 and trace the countBy = "person" path that accesses standard_concept_name. Reproduce the supplied summariseCodeUse example, then verify that requesting person counts completes without the missing-column error and returns person counts only.
Written by the indexing model from the issue text.
Description
Describe the bug
When using the argument summariseCodeUse and setting countBy = "person" an error message occurs.
To Reproduce
Steps to reproduce the behavior:
atc2 <- c("ANTIEMETICS AND ANTINAUSEANTS" ,
"DRUGS FOR FUNCTIONAL GASTROINTESTINAL DISORDERS" )
atc2_codelist <- getATCCodes(
cdm,
level = c("ATC 2nd"),
name = atc2,
doseForm = NULL,
doseUnit = NULL,
routeCategory = NULL,
type = "codelist"
)
atc2_codelist_n <- summariseCodeUse(atc2_codelist,
countBy = "person",
byConcept = FALSE,
cdm = cdm)
error message:
Error in `dplyr::mutate()` at CodelistGenerator/R/summariseCodeUse.R:417:5:
ℹ In argument: `variable_name = dplyr::if_else(...)`.
Caused by error in `.data$standard_concept_name`:
! Column `standard_concept_name` not found in `.data`.
Run `rlang::last_trace()` to see where the error occurred.
Expected behavior
A clear and concise description of what you expected to happen.
Should return code use for person counts only but an error message occurs. For now just setting to default where it returns both record and person counts.
Screenshots
NA
Desktop (please complete the following information):
- Browser chrome
- Version Cran version codelistgenerator as of todays date (26/6/26)
- Dominant language
- R
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from darwin-eu/CodelistGenerator
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
darwin-eu/CodelistGenerator#251 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
darwin-eu/CodelistGenerator#242 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
darwin-eu/CodelistGenerator#249 · 1 comment ·
-
Feature Request: Add getCodelistFromConceptSet() function for direct database query of concept sets Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
darwin-eu/CodelistGenerator#248 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
darwin-eu/CodelistGenerator#247 ·
All issues in darwin-eu/CodelistGenerator
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100