-
Notifications
You must be signed in to change notification settings - Fork 2
/
06-conclusion.Rmd
176 lines (115 loc) · 5.45 KB
/
06-conclusion.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
class: inverse, center, middle
# Conclusion
---
# {gtsummary} - Package Website
Website contains [well-documented functions](http://www.danieldsjoberg.com/gtsummary/reference/index.html), detailed [tutorials](http://www.danieldsjoberg.com/gtsummary/articles/), and [examples](http://www.danieldsjoberg.com/gtsummary/articles/gallery.html)!
[<img src="images/gtsummary_website.png" width=80%>](http://www.danieldsjoberg.com/gtsummary/)
???
For live presentation include scrolling iframe
<iframe src="http://www.danieldsjoberg.com/gtsummary/" scrolling= "yes" width = "950%" height = 90%"></iframe>
---
# {gtsummary} Installation
.pull-left[
.medium[
* Install {gtsummary} from **CRAN** with the following code:
``` {r, eval=FALSE}
install.packages("gtsummary")
```
* Also recommended to install the development version of {gt} from **GitHub**.
``` {r, eval=FALSE}
install.packages("remotes")
remotes::install_github("rstudio/gt")
```
]
]
.pull-right[
<img src="images/cranlogs.png" width=100%>
]
???
- visit the website and give quick tour
r include_url("http://www.danieldsjoberg.com/gtsummary/", height = "400px")
* {gtsummary} package website: http://www.danieldsjoberg.com/gtsummary/
* <img src = "images/open-book-white.png" width="2.4%" height="2.4%"> Installation instructions
* <img src = "images/open-book-white.png" width="2.4%" height="2.4%"> Thorough documentation on every function
* <img src = "images/open-book-white.png" width="2.4%" height="2.4%"> Detailed tutorials
---
class: center
# Resources
.large[
<img src = "images/open-book-white.png" width="2.4%" height="2.4%"> {gtsummary} documentation/website/tutorials <a href="http://www.danieldsjoberg.com/gtsummary/">danieldsjoberg.com/gtsummary/</a>
<img src = "images/github_icon.png" width="2.4%" height="2.4%"> {gtsummary} package <a href="https://github.com/ddsjoberg/gtsummary">github.com/ddsjoberg/gtsummary</a>
<img src = "images/slide_show_icon.png" width="2.4%" height="2.4%"> slides at <a href="https://github.com/margarethannum/gtsummary-presentation-rladies">github.com/margarethannum/gtsummary-presentation-rladies</a>
<img src = "images/github_icon.png" width="2.4%" height="2.4%"> source code for slides at <a href="https://github.com/margarethannum/gtsummary-presentation-rladies">github.com/margarethannum/gtsummary-presentation-rladies</a>
<img src = "images/github_icon.png" width="2.4%" height="2.4%"> {gt} package <a href="https://github.com/rstudio/gt">github.com/rstudio/gt</a>
]
Slides created using [xaringan](https://github.com/yihui/xaringan) R package
[R-Ladies xaringan theme](https://alison.rbind.io/post/2017-12-18-r-ladies-presentation-ninja/) from Alison Hill (@apreshill)
```{r include = FALSE, echo=FALSE, eval=FALSE}
library(lubridate)
library(scales)
library(tidyverse)
theme_set(mskRvis::theme_biostat())
dl <- cranlogs::cran_downloads(packages = "gtsummary", from = "2019-08-19", to = "last-day")
dlmonth <- dl %>%
group_by(month = floor_date(date, "month")) %>%
summarize(amount = sum(count)) %>%
filter(month != "2020-03-01")
p <- ggplot(dlmonth, aes(x = month, y = amount)) +
geom_line() +
xlab("") +
coord_cartesian(ylim = c(0,1600)) +
labs(
title = "{gtsummary} CRAN downloads",
subtitle = "source: cranlogs"
) +
ylab("Downloads/Month") +
xlab("Months since official CRAN release (August 2019)") +
scale_x_date(
date_breaks = "1 month",
labels = date_format("%m-%Y")) +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) #+
# geom_vline(xintercept = as.numeric(as.Date("2019-05-01")),
# linetype = 4,
# color = "seagreen")
#ggsave(p, filename = "images/cranlogs.png")
```
???
Go star {gtsummary} on GitHub...we're already to 50+!
---
# Thank you!
<img src="images/sjoberg.jpg" width=15%>
<img src="images/hannum.jpg" width=15%>
<img src="images/whiting.jpg" width=15%>
♥ {gtsummary} Authors: [**Daniel Sjoberg**](http://www.danieldsjoberg.com/) (Maintainer), Margie Hannum, Karissa Whiting
<img src="images/curry.jpg" width=15%>
<img src="images/drill.jpg" width=15%>
<img src="images/flynn.jpg" width=15%>
<img src="images/lobaugh.jpg" width=15%>
♥ {gtsummary} Contributors: Emily Zabor (not pictured), Michael Curry, Esther Drill, Jessica Flynn, Stephanie Lobaugh
♥ Huge thank you to [Rich Iannone](https://github.com/rich-iannone), the Author/Maintainer of the {gt} package.
♥ And thank you to everyone in Epidemiology and Biostatistics at Memorial Sloan Kettering for testing the package and providing valuable feedback!
---
# Appendix: {gtsummary} Advanced
.large[
{gtsummary} output is a list that prints as a {gt} table.
]
```{r}
names(tbl_summary_1)
```
```{r}
pluck(tbl_summary_1, "table_body") %>% head()
```
---
# Appendix: {gtsummary} Advanced
```{r}
pluck(tbl_summary_1, "gt_calls") %>% head(n = 4)
```
???
If there is time, review the structure of a {gtsummary} object
Essentially, what is going on is that the {gt} calls on the right are called on the table on the left whenever the object is printed.
Understanding this structure will help you modify if you need. If there is a {gt} call that formats in a way you don't like, convert your object with `as_gt()` and use the `omit =` argument to leave out the gt call you don't like.
You can replace it with whatever you choose.
<!-- --- -->
<!-- # Customization -->
<!-- ### Additional customization -->
<!-- - **Table footnotes** (you can optionally exclude these using `as_gt(exclude = "footnote_stat_label")` ) -->