Skip to content

Commit

Permalink
Exclude participants that don't have data indicating what device they…
Browse files Browse the repository at this point in the history
… used
  • Loading branch information
pranavanba committed Mar 19, 2024
1 parent 9dc5bbd commit 6a624d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/write-output/final-output-concepts.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ combined_output_concepts <- bind_rows(combined_device,
combined_healthkit)
combined_output_concepts <- combined_output_concepts[!duplicated(combined_output_concepts), ]

valid_participants <-
read.csv(file.path(outputConceptsDir, "participant_devices.csv")) %>%
distinct(participantidentifier) %>%
pull()

combined_output_concepts <-
combined_output_concepts %>%
filter(participantidentifier %in% valid_participants)

combined_output_concepts %>%
write.csv(file.path(outputConceptsDir, "output_concepts.csv"), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, 'output_concepts.csv')}"),"\n")
Expand Down

0 comments on commit 6a624d7

Please sign in to comment.