-
-
Notifications
You must be signed in to change notification settings - Fork 7
gtsummary support in table_with_settings #337
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
Conversation
|
Hey @llrs-roche and @gogonzo I though we can dispatch the current approach implement for rtables, to support gt and gtsummary objects. For now there are placeholder. What do you think? If you give it a green light, I'll try to fill placeholders with actual implementation |
|
I think using dispatch is the best approach. This way we can support new objects like on #334 |
|
Looks very good ⭐ |
Code Coverage SummaryDiff against mainResults for commit: c011502 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 16 suites 1m 51s ⏱️ Results for commit c011502. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit c0c18fc ♻️ This comment has been updated with latest results. |
|
Amazing, I will proceed with implementation, some examples and finally with tests |
…ering/teal.widgets into gtsummary_support
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
…ering/teal.widgets into gtsummary_support
llrs-roche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost ready.
For the text format of gtsummary could we use like a table with write.table() but without quotes? It will be easier to read than the html as it includes many tags, attrigutes and some elements that are out of the table:
<div id="uftobyoadg" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
But I'm not really sure who will use the text format of gtsummary. If this is for reporting it won't look good.
Not sure what I missed but the tests don't seem to cover anything from the file (but at the same time the CI only reports a 1% decrease)
covr::file_coverage("R/table_with_settings.R", "tests/testthat/test-table_with_settings.R")
Test passed with 2 successes 🥳.
Test passed with 1 success 🥇.
Test passed with 3 successes 😸.
Test passed with 1 success 😸.
Test passed with 6 successes 😀.
Test passed with 6 successes 🎉.
Test passed with 6 successes 🥳.
Test passed with 2 successes 🌈.
Test passed with 1 success 🌈.
Test passed with 1 success 🎊.
Test passed with 3 successes 🥳.
Test passed with 3 successes 🥳.
Coverage: 0.00%
R/table_with_settings.R: 0.00%|
Hey @llrs-roche I applied your feedback.
If you accept I will try to remove formatters and rtables from Remotes, before I merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gt text export should not print the X1, X2, X3 if possible other than that I am a bit unsure about all the methods and how they are used. But let's merge it.
Remember to test without the dev versions of rtables and formatters and to fix the style and lintr checks.
One last question. Is it possible to test the file downloaded/generated? I'm just wondering if we can test that it produces something without writing to the temp folder
|
@llrs-roche I was able to cleanup gt objects, so the title of the table is dropped and we only save the data in text output
|
Will test now!
No idea. I think we should be able to test the content of the file that is saved to temp folder. We've got this |

Fix
Idea, we extract
export_tableandrender_table_to_htmlout of the existing functionality forrtablesand we add a dispatch forgt_tblandgtsummaryobjects :)Tested with
gtsummary
PDF export
CSV export
TEXT export
gt
PDF export
CSV export
TEXT export