Easy Summary Tables in R with gtsummary
HTML-код
- Опубликовано: 11 сен 2024
- The gtsummary package lets you produce summary statistics for your numeric and categorical variables, formatted into a neat table. You can include p-values for pairwise comparisons and also split your summary across the categories of one of your covariates.
Code available from drlyndonwalker...
My SkillShare courses: (includes a 1 month free trial)
Getting started with R skl.sh/3cyKwzi
How to Write an Academic Journal Article skl.sh/3hpm3i0
How to read an academic paper skl.sh/3wO9Skp
Introduction to Flipped Classroom Teaching skl.sh/3TBK7jw
Connect with me:
🐥 My Twitter - / drlyndonwalker
💻 My Website - www.drlyndonwa...
Join my Facebook Community - / drlyndonwalker
Thanks very much. This is a great little package, well explained, and it’s made my life a lot easier.
This is excellent, very helpful! Thank you so much for this!
In the middle of finishing a research thesis and was struggling with the table 1 function. Thanks for explaining the functionality of this package in such an easy to understand way!
All the best with the thesis
Thanks, Walker! I am now your new subscriber
Very helpful. Thank you
that was helpful, thanks for sharing 😊😊
Well explained here thanks
Muchisimas gracias. Saludos desde Cuba. :)
Oiga hermano, de que parte de Cuba estas hermano?
tks so much!!!!
Is it possible that alongwith P value we also have Chi Square Statistics value & df value in GtSummary table..if yes what's the code
Absolutely. It's in the list here: www.danieldsjoberg.com/gtsummary/reference/tests.html
@@DrLyndonWalker As I was going through the reference you forwarded: ( correct me if I am wrong )
1. add_p() function will automatically pick up the relevant available Statistical test and will provide the values
2. In add_p(test.args=) function , I need to specify the relevant test using code given adajcent to the test, it will not automatically pick up the available statistical test.
@nukenelson not in front of R right to test but something like this should do it.
chatgpt.com/share/0fca98cf-7d8d-4795-a737-7475bbe7d79a
Thanks for the video, do you know how to create summary tables for Multiple response questions? Would highly appreciate any guidance.
Maybe something like this cran.r-project.org/web/packages/tidyREDCap/vignettes/makeChooseAllTable.html
@@DrLyndonWalker Thank you sir! Really apprecaite it!
Thank you for the excellent video. Is there any way to add the missing value propositions by variable?
There is the missing parameter in tbl_summary but it is global (omit all, always include, only show if present). If you wanted to include/exclude a single variable only I would do it earlier in the chain by using something like na.omit or subsetting (eg something like square brackets with an !is.na()
Thank you for the video. I get an error message below when I try to require (installation works without any issues) gtsummary. Do you know what I should do to solve this issue?
I would appreciate any guidance. Thanks.
"Error: package or namespace load failed for ‘gtsummary’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘vctrs’ 0.6.2 is already loaded, but >= 0.6.3 is required"
Try install.packages("vctrs"). If that doesn't work, run remove.packages("vctrs") first and then try install.packages("vctrs") run remove.packages("vctrs") first and then try install.packages("vctrs")
@@DrLyndonWalker Thank you!!
is there a way I can include complex survey design to get weighted estimates?
I would do that by using a package like survey to get the figures I want, then a table package like flextable or tabyl in janitor to make my tables.
should this package work well when knitting into PDF or word?
There is a great summary on this blog: www.danieldsjoberg.com/gtsummary/articles/rmarkdown.html
Hello Sir,
Could you please guide me how to convert the viewer window to RTF file in R
Do you want to export as an rtf? You could use rmarkdown for the whole project bookdown.org/yihui/rmarkdown/rich-text-format-document.html
Or something like this for just the image
stackoverflow.com/questions/38035764/r-language-writing-a-jpeg-into-an-rtf-document-using-rtf-package