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

In TADA_HarmonizeSynonyms, Harmonized = TRUE needs adjusting #339

Open
6 tasks
elisehinman opened this issue Sep 7, 2023 · 1 comment
Open
6 tasks

In TADA_HarmonizeSynonyms, Harmonized = TRUE needs adjusting #339

elisehinman opened this issue Sep 7, 2023 · 1 comment
Assignees
Labels

Comments

@elisehinman
Copy link
Contributor

Describe the bug

Rows with fraction and speciation that need to be converted FROM some text TO NA are not flagged as HARMONIZED in the TADA.Harmonized.Flag column.

In TADA_HarmonizeSynonyms, @cristinamullin pointed out:

Also line 217, where targets are only assigned if NA. # find places where metadata will be changed and add targets
harm.ref$TADA.Harmonized.Flag <- ifelse(!is.na(harm.ref$Target.TADA.CharacteristicName) | !is.na(harm.ref$Target.TADA.ResultSampleFractionText) | !is.na(harm.ref$Target.TADA.MethodSpecificationName) | !is.na(harm.ref$Target.TADA.ResultMeasure.MeasureUnitCode), TRUE, FALSE)

This needs to be adjusted to also catch situations where the fraction or speciation are converted to NA from something else. This could be run as a separate ifelse statement below this one that mirrors the logic used in line 246 of this function.

Reminders for TADA contributors addressing this issue

New features should include all of the following work:

  • Create the function/code.

  • Document all code using comments to describe what is does.

  • Create tests in tests folder.

  • Create help file using roxygen2 above code.

  • Create working examples in help file (via roxygen2).

  • Add to appropriate vignette (or create new one).

@hillarymarler
Copy link
Collaborator

@cristinamullin - it would make sense to work on this along with the pH harmonization issues (#454)

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