Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when creating conceptCohort() #334

Closed
ilovemane opened this issue Sep 25, 2024 · 3 comments
Closed

error when creating conceptCohort() #334

ilovemane opened this issue Sep 25, 2024 · 3 comments
Assignees

Comments

@ilovemane
Copy link
Collaborator

I am sorry, but I ran into this error when I was trying to create this cohort with conceptCohort() in cprd_gold I was using the public_100k.

concept_code <- c(374919,   761978,   765565,  1340507,  3045574,  4046108,  4101729,  4102337,
                  4105353,  4137855,  4145049,  4178929,  4231948,  4258676, 35623817,
                  37110514, 37116351, 37311816, 40757943, 40761214, 44782559, 44784474)

multiple_sclerosis <- omopgenerics::newCodelist(list("multiple_sclerosis" = concept_code))

multiple_sclerosis

cdm$table <- cdm |> 
  conceptCohort(conceptSet = multiple_sclerosis,
                name = "table") 

it return below

Adding indexes to table
Error in attr(attr(cdm[[name]], "tbl_source"), "write_schema")[["schema"]] : 
  subscript out of bounds

@edward-burn edward-burn self-assigned this Sep 25, 2024
@ilovemane
Copy link
Collaborator Author

just adding that it only throws an error in version 0.3.0. It works in 0.2.2

@edward-burn
Copy link
Collaborator

Ah I see this happens when a prefix is not used when creating the cdm, will fix that

@edward-burn
Copy link
Collaborator

This should now be fixed on the main branch @ilovemane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants