Closed rsh52 closed 1 year ago
One wrinkle: we don’t know if someone adds labels or skimr first. Ideally it should work both ways.
Another thought: would it make sense to check if someone has labelled and/or skimr installed and then by default read_redcap_tidy() applies one or both?
Get Outlook for iOShttps://aka.ms/o0ukef
From: Rich Hanna @.> Sent: Friday, May 19, 2023 9:53:45 AM To: CHOP-CGTInformatics/REDCapTidieR @.> Cc: Subscribed @.***> Subject: [External][CHOP-CGTInformatics/REDCapTidieR] [FEATURE] XLSX and Skimr Enhancements (Issue #150)
Feature Request Description
Per requests in #149https://github.com/CHOP-CGTInformatics/REDCapTidieR/pull/149, we wish to add the following features to write_redcap_xlsx() and add_skimr_metadata():
We need to also update the vignettes and add a new section to Getting Started/Diving Deeper that details add_skimr_metadata() usage but that may happen in a separate PR from the one addressing the above bullet points.
Checklist
— Reply to this email directly, view it on GitHubhttps://github.com/CHOP-CGTInformatics/REDCapTidieR/issues/150, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACTGHWQVHWKX55RY4DOHMKLXG53OTANCNFSM6AAAAAAYH2EBXY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
This email originated from an EXTERNAL sender to CHOP. Proceed with caution when replying, opening attachments, or clicking links. Do not disclose your CHOP credentials, employee information, or protected health information to a potential hacker.
One wrinkle: we don’t know if someone adds labels or skimr first. Ideally it should work both ways. Another thought: would it make sense to check if someone has labelled and/or skimr installed and then by default read_redcap_tidy() applies one or both?
The add_skimr_metadata()
function checks if skimr
is installed, and both make_labelled()
and write_redcap_xlsx()
check for if labelled
is installed before applying labels (the latter really only matters if a user specifies they want them and it isn't installed).
Hm, it's a little complicated to work both ways. I guess these are the scenarios we want to be mindful of:
1) supertibble |> add_skimr_metadata() > make_labelled()
requires make_labelled()
to apply labels to everything in the output.
2) supertibble |> make_labelled() > add_skimr_metadata()
requires add_skimr_metadata()
to apply labels to the skimr data in the output.
write_redcap_xlsx()
is set up to auto-detect labels and apply them if no user specification is provided, what we don't want it to accidentally detect labels when they aren't desired if they're going to exist in add_skimr_metadata()
.
I'll start working on it today, should be fun.
Just so I don't forget. Let's add to the README.md Usage section, right below the bind_tibbles() demo, a demo of the XLSX workflow. Like so:
Use read_redcap() together with write_redcap_xlsx() to transform a REDCap database into a collaborator-friendly Excel document.
```r library(REDCapTidieR)
redcap_uri <- ... superheroes_token <- ...
read_redcap(redcap_uri, superheroes_token) |> write_redcap_xlsx("superheroes.xlsx")
[Picture of Excel sheet here]
Read the Exporting to Excel vignette to learn more.
---
________________________________
From: Kadauke, Stephan ***@***.***>
Sent: Friday, May 19, 2023 10:32 AM
To: CHOP-CGTInformatics/REDCapTidieR ***@***.***>; CHOP-CGTInformatics/REDCapTidieR ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [External][CHOP-CGTInformatics/REDCapTidieR] [FEATURE] XLSX and Skimr Enhancements (Issue #150)
One wrinkle: we don’t know if someone adds labels or skimr first. Ideally it should work both ways.
Another thought: would it make sense to check if someone has labelled and/or skimr installed and then by default read_redcap_tidy() applies one or both?
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Rich Hanna ***@***.***>
Sent: Friday, May 19, 2023 9:53:45 AM
To: CHOP-CGTInformatics/REDCapTidieR ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [External][CHOP-CGTInformatics/REDCapTidieR] [FEATURE] XLSX and Skimr Enhancements (Issue #150)
Feature Request Description
Per requests in #149<https://github.com/CHOP-CGTInformatics/REDCapTidieR/pull/149>, we wish to add the following features to write_redcap_xlsx() and add_skimr_metadata():
* Add a column to the REDCap Metadata sheet output in write_redcap_xlsx() that provides the instrument label next to the redcap_form_name that was added in #149<https://github.com/CHOP-CGTInformatics/REDCapTidieR/pull/149>
* Add default skimr labels so they appear in REDCap Metadata sheet outputs
* This likely needs to be done in add_skimr_metadata() and has to account for what skimmers are actually present
* Add snapshot integration tests for write_redcap_xlsx() that test for combined use of labelled, skimr and openxlsx2 packages
We need to also update the vignettes and add a new section to Getting Started/Diving Deeper that details add_skimr_metadata() usage but that may happen in a separate PR from the one addressing the above bullet points.
Checklist
* [NA] The issue is atomic
* The issue description is documented
* The issue title describes the problem succinctly
* Developers are assigned to the issue
* Labels are assigned to the issue
—
Reply to this email directly, view it on GitHub<https://github.com/CHOP-CGTInformatics/REDCapTidieR/issues/150>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACTGHWQVHWKX55RY4DOHMKLXG53OTANCNFSM6AAAAAAYH2EBXY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
** This email originated from an EXTERNAL sender to CHOP. Proceed with caution when replying, opening attachments, or clicking links. Do not disclose your CHOP credentials, employee information, or protected health information to a potential hacker**.
Feature Request Description
Per requests in #149, we wish to add the following features to
write_redcap_xlsx()
andadd_skimr_metadata()
:write_redcap_xlsx()
that provides the instrument label next to theredcap_form_name
that was added in #149skimr
labels so they appear in REDCap Metadata sheet outputsadd_skimr_metadata()
and has to account for what skimmers are actually presentwrite_redcap_xlsx()
that test for combined use of labelled, skimr and openxlsx2 packagesWe need to also update the vignettes and add a new section to Getting Started/Diving Deeper that details
add_skimr_metadata()
usage but that may happen in a separate PR from the one addressing the above bullet points.Checklist